mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Store constant values as an array of unions.
This allows us to more easily manipulate individual elements in a type-agnostic way. For example, it allows easier implementation of constant swizzle folding. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
e2b57f6d2b
commit
b4e301b2d8
@@ -374,14 +374,14 @@ struct hlsl_ir_store
|
||||
struct hlsl_ir_constant
|
||||
{
|
||||
struct hlsl_ir_node node;
|
||||
union
|
||||
union hlsl_constant_value
|
||||
{
|
||||
unsigned u[4];
|
||||
int i[4];
|
||||
float f[4];
|
||||
double d[4];
|
||||
bool b[4];
|
||||
} value;
|
||||
uint32_t u;
|
||||
int32_t i;
|
||||
float f;
|
||||
double d;
|
||||
bool b;
|
||||
} value[4];
|
||||
struct hlsl_reg reg;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user