mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Use the register index count in I/O registers in vkd3d_symbol_make_register().
This commit is contained in:
parent
532fe01818
commit
ec5f195b6b
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
@ -2060,11 +2060,8 @@ static void vkd3d_symbol_make_register(struct vkd3d_symbol *symbol,
|
||||
if (vkd3d_shader_register_is_input(reg) || vkd3d_shader_register_is_output(reg)
|
||||
|| vkd3d_shader_register_is_patch_constant(reg))
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 2; i > 0; --i)
|
||||
if (reg->idx[i].offset != ~0u)
|
||||
break;
|
||||
symbol->key.reg.idx = reg->idx[i].offset;
|
||||
symbol->key.reg.idx = reg->idx_count ? reg->idx[reg->idx_count - 1].offset : ~0u;
|
||||
assert(!reg->idx_count || symbol->key.reg.idx != ~0u);
|
||||
}
|
||||
else if (reg->type != VKD3DSPR_IMMCONSTBUFFER)
|
||||
symbol->key.reg.idx = reg->idx[0].offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user