mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Use appropriate result type for swizzles
Swizzles now result in a vector of the same width as the swizzle itself rather than the source vector.
This commit is contained in:
parent
2bc7cc3d22
commit
953be00a72
2 changed files with 1 additions and 4 deletions
|
@ -285,9 +285,6 @@ typedef struct {
|
|||
type_t *type; ///< result type
|
||||
} ex_horizontal_t;
|
||||
|
||||
//NOTE always operates on vec4 or dvec4, so needs a suitable destination and
|
||||
//care must be taken when working with smaller source operands (check aligmnet
|
||||
//and adjust swizzle operation as needed)
|
||||
typedef struct {
|
||||
const expr_t *src; ///< source expression
|
||||
unsigned source[4]; ///< src component indices
|
||||
|
|
|
@ -667,7 +667,7 @@ new_swizzle_expr (const expr_t *src, const char *swizzle)
|
|||
}
|
||||
swiz.zero |= (0xf << comp_count) & 0xf;
|
||||
swiz.src = src;
|
||||
swiz.type = src_type;
|
||||
swiz.type = vector_type (base_type (src_type), comp_count);
|
||||
|
||||
expr_t *expr = new_expr ();
|
||||
expr->type = ex_swizzle;
|
||||
|
|
Loading…
Reference in a new issue