diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index cfd78351..59c543c7 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -361,6 +361,9 @@ struct hlsl_attribute HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \ HLSL_MODIFIER_COLUMN_MAJOR) +#define HLSL_INTERPOLATION_MODIFIERS_MASK (HLSL_STORAGE_NOINTERPOLATION | HLSL_STORAGE_CENTROID | \ + HLSL_STORAGE_NOPERSPECTIVE) + #define HLSL_MODIFIERS_MAJORITY_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) #define HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT 0 diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 3feb35fb..ba738473 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -5051,7 +5051,7 @@ field: if (!(type = apply_type_modifiers(ctx, $2, &modifiers, true, &@1))) YYABORT; - if (modifiers & ~HLSL_STORAGE_NOINTERPOLATION) + if (modifiers & ~HLSL_INTERPOLATION_MODIFIERS_MASK) { struct vkd3d_string_buffer *string; diff --git a/tests/hlsl/nointerpolation.shader_test b/tests/hlsl/nointerpolation.shader_test index 3193b2e6..04f39a8e 100644 --- a/tests/hlsl/nointerpolation.shader_test +++ b/tests/hlsl/nointerpolation.shader_test @@ -119,7 +119,7 @@ void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_posit pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1); } -[pixel shader todo] +[pixel shader] struct ps_input { centroid float4 t : texcoord; @@ -131,10 +131,10 @@ float4 main(nointerpolation ps_input input) : sv_target } [test] -todo draw triangle list 3 -todo probe all rgba (0.0, 1.0, 0.0, 1.0) +draw triangle list 3 +probe all rgba (0.0, 1.0, 0.0, 1.0) -[vertex shader fail] +[vertex shader fail todo] struct ps_input { nointerpolation centroid float4 t : texcoord;