diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 3bb90c98..4acedb78 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -4776,7 +4776,9 @@ static void validate_buffer_offsets(struct hlsl_ctx *ctx) continue; if (var1->reg_reservation.offset_type - || (var1->data_type->class == HLSL_CLASS_OBJECT && var1->reg_reservation.reg_type)) + || var1->reg_reservation.reg_type == 's' + || var1->reg_reservation.reg_type == 't' + || var1->reg_reservation.reg_type == 'u') buffer->manually_packed_elements = true; else buffer->automatically_packed_elements = true; diff --git a/tests/hlsl/cbuffer.shader_test b/tests/hlsl/cbuffer.shader_test index 966346c5..1297b72b 100644 --- a/tests/hlsl/cbuffer.shader_test +++ b/tests/hlsl/cbuffer.shader_test @@ -805,7 +805,7 @@ float4 main() : sv_target return 0; } -[pixel shader todo fail(sm>=6)] +[pixel shader fail(sm>=6)] cbuffer buffer { float4 foo : packoffset(c0); @@ -821,7 +821,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 0.1 0.2 0.3 0.4 -todo draw quad +todo(glsl) draw quad probe all rgba (1.1, 2.2, 3.3, 4.4) @@ -832,7 +832,7 @@ shader model >= 5.0 size (2d, 1, 1) 0.0 0.0 0.0 0.5 -[pixel shader todo] +[pixel shader] struct apple { float2 a; @@ -858,5 +858,5 @@ uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 uniform 12 float4 12.0 13.0 14.0 15.0 uniform 16 float4 16.0 17.0 18.0 19.0 -todo(sm<6) draw quad +todo(glsl) draw quad probe all rgba (124.0, 135.0, 146.0, 150.5)