vkd3d-shader/hlsl: Allocate register reservations for structs as well.

This commit is contained in:
Zebediah Figura 2024-01-13 18:47:31 -06:00 committed by Alexandre Julliard
parent 622fcda9ee
commit 0b1f11dd33
Notes: Alexandre Julliard 2024-03-27 23:06:24 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/626
2 changed files with 2 additions and 5 deletions

View File

@ -3761,9 +3761,6 @@ static void allocate_register_reservations(struct hlsl_ctx *ctx)
{ {
unsigned int r; unsigned int r;
if (!hlsl_type_is_resource(var->data_type))
continue;
if (var->reg_reservation.reg_type) if (var->reg_reservation.reg_type)
{ {
for (r = 0; r <= HLSL_REGSET_LAST_OBJECT; ++r) for (r = 0; r <= HLSL_REGSET_LAST_OBJECT; ++r)

View File

@ -198,7 +198,7 @@ filter linear linear linear
address clamp clamp clamp address clamp clamp clamp
% If a struct spans many object register sets and one is reserved, all other used object register sets must be. % If a struct spans many object register sets and one is reserved, all other used object register sets must be.
[pixel shader fail(sm<6) todo] [pixel shader fail(sm<6)]
struct struct
{ {
Texture2D tex; Texture2D tex;
@ -242,4 +242,4 @@ float4 main() : sv_target
[test] [test]
todo(glsl) draw quad todo(glsl) draw quad
todo(sm<6) probe all rgba (1.0, 1.0, 1.0, 99.0) probe all rgba (1.0, 1.0, 1.0, 99.0)