vkd3d-shader/spirv: Use the register index count in I/O register assertions.

This commit is contained in:
Conor McCarthy 2023-05-26 16:46:25 +10:00 committed by Alexandre Julliard
parent 178a7677e2
commit 06dd0ccd4c
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

View File

@ -4626,9 +4626,8 @@ static void spirv_compiler_emit_input_register(struct spirv_compiler *compiler,
uint32_t write_mask;
uint32_t input_id;
assert(!reg->idx[0].rel_addr);
assert(!reg->idx[1].rel_addr);
assert(reg->idx[1].offset == ~0u);
assert(!reg->idx_count || !reg->idx[0].rel_addr);
assert(reg->idx_count < 2);
if (!(builtin = get_spirv_builtin_for_register(reg->type)))
{
@ -4783,9 +4782,8 @@ static void spirv_compiler_emit_output_register(struct spirv_compiler *compiler,
uint32_t write_mask;
uint32_t output_id;
assert(!reg->idx[0].rel_addr);
assert(!reg->idx[1].rel_addr);
assert(reg->idx[1].offset == ~0u);
assert(!reg->idx_count || !reg->idx[0].rel_addr);
assert(reg->idx_count < 2);
if (!(builtin = get_spirv_builtin_for_register(reg->type)))
{