vkd3d-shader/hlsl: Reserve register slots for unused buffers.

This commit is contained in:
Victor Chiletto 2024-07-03 14:05:58 -03:00
parent da36a447b8
commit abbcf0461f
Notes: Henri Verbeet 2024-07-08 18:04:49 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/792
2 changed files with 2 additions and 2 deletions

View File

@ -4777,7 +4777,7 @@ static const struct hlsl_buffer *get_reserved_buffer(struct hlsl_ctx *ctx, uint3
LIST_FOR_EACH_ENTRY(buffer, &ctx->buffers, const struct hlsl_buffer, entry)
{
if (buffer->used_size && buffer->reservation.reg_type == 'b'
if (buffer->reservation.reg_type == 'b'
&& buffer->reservation.reg_space == space && buffer->reservation.reg_index == index)
return buffer;
}

View File

@ -717,7 +717,7 @@ float4 main(uniform float param) : sv_target
return glob * param * a * b * c * d * e * f * g * h * i * j * k * l * m;
}
[pixel shader fail todo]
[pixel shader fail]
// Unused cbuffers still reserve their slot, and count towards the limit.
float glob;