mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Put the hlsl_ir_constant value in a structure.
This commit is contained in:
committed by
Alexandre Julliard
parent
3cce4e70e9
commit
0a44e6043e
Notes:
Alexandre Julliard
2023-05-01 22:25:00 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/177
@@ -1151,7 +1151,7 @@ static unsigned int evaluate_static_expression(struct hlsl_ir_node *node)
|
||||
case HLSL_IR_CONSTANT:
|
||||
{
|
||||
struct hlsl_ir_constant *constant = hlsl_ir_constant(node);
|
||||
const union hlsl_constant_value *value = &constant->value[0];
|
||||
const union hlsl_constant_value_component *value = &constant->value.u[0];
|
||||
|
||||
switch (constant->node.data_type->base_type)
|
||||
{
|
||||
@@ -2863,10 +2863,10 @@ static bool intrinsic_lit(struct hlsl_ctx *ctx,
|
||||
|
||||
if (!(init = hlsl_new_constant(ctx, ret_type, loc)))
|
||||
return false;
|
||||
init->value[0].f = 1.0f;
|
||||
init->value[1].f = 0.0f;
|
||||
init->value[2].f = 0.0f;
|
||||
init->value[3].f = 1.0f;
|
||||
init->value.u[0].f = 1.0f;
|
||||
init->value.u[1].f = 0.0f;
|
||||
init->value.u[2].f = 0.0f;
|
||||
init->value.u[3].f = 1.0f;
|
||||
list_add_tail(params->instrs, &init->node.entry);
|
||||
|
||||
if (!(store = hlsl_new_simple_store(ctx, var, &init->node)))
|
||||
|
||||
Reference in New Issue
Block a user