mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/spirv: Use the register index count in aggregate register dereferences.
This commit is contained in:
parent
ad08864134
commit
a2b3f70d8e
Notes:
Alexandre Julliard
2023-05-26 22:16:37 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/213
@ -3368,9 +3368,9 @@ static void spirv_compiler_emit_dereference_register(struct spirv_compiler *comp
|
|||||||
else if (register_info->is_aggregate)
|
else if (register_info->is_aggregate)
|
||||||
{
|
{
|
||||||
/* Indices for these are swapped compared to the generated SPIR-V. */
|
/* Indices for these are swapped compared to the generated SPIR-V. */
|
||||||
if (reg->idx[2].offset != ~0u)
|
if (reg->idx_count > 2)
|
||||||
indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[1]);
|
indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[1]);
|
||||||
if (reg->idx[1].offset != ~0u)
|
if (reg->idx_count > 1)
|
||||||
indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[0]);
|
indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[0]);
|
||||||
if (!index_count)
|
if (!index_count)
|
||||||
/* A register sysval which is an array in SPIR-V, e.g. SAMPLEMASK. */
|
/* A register sysval which is an array in SPIR-V, e.g. SAMPLEMASK. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user