mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/fx: Use the correct field indices when writing structure default values.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
a06ecb6867
commit
2e40154801
Notes:
Henri Verbeet
2025-05-24 21:48:20 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1510
@@ -1688,8 +1688,8 @@ static uint32_t write_fx_2_default_value(struct hlsl_type *value_type, struct hl
|
|||||||
|
|
||||||
for (j = 0; j < type->e.record.field_count; ++j)
|
for (j = 0; j < type->e.record.field_count; ++j)
|
||||||
{
|
{
|
||||||
write_fx_2_default_value(fields[i].type, value, fx);
|
write_fx_2_default_value(fields[j].type, value, fx);
|
||||||
value += hlsl_type_component_count(fields[i].type);
|
value += hlsl_type_component_count(fields[j].type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2033,8 +2033,8 @@ static uint32_t write_fx_4_default_value(struct hlsl_type *value_type, struct hl
|
|||||||
|
|
||||||
for (j = 0; j < type->e.record.field_count; ++j)
|
for (j = 0; j < type->e.record.field_count; ++j)
|
||||||
{
|
{
|
||||||
write_fx_4_default_value(fields[i].type, value, fx);
|
write_fx_4_default_value(fields[j].type, value, fx);
|
||||||
value += hlsl_type_component_count(fields[i].type);
|
value += hlsl_type_component_count(fields[j].type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user