From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d-shader/hlsl.l | 1 + libs/vkd3d-shader/hlsl.y | 6 ++++++ tests/hlsl/uav-rwtexture.shader_test | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l index e3da914ec..b3d4aeee8 100644 --- a/libs/vkd3d-shader/hlsl.l +++ b/libs/vkd3d-shader/hlsl.l @@ -111,6 +111,7 @@ RWStructuredBuffer {return KW_RWSTRUCTUREDBUFFER; } RWTexture1D {return KW_RWTEXTURE1D; } RWTexture1DArray {return KW_RWTEXTURE1DARRAY; } RWTexture2D {return KW_RWTEXTURE2D; } +RWTexture2DArray {return KW_RWTEXTURE2DARRAY; } RWTexture3D {return KW_RWTEXTURE3D; } sampler {return KW_SAMPLER; } sampler1D {return KW_SAMPLER1D; } diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 7d645ce9a..e58574f75 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -4724,6 +4724,7 @@ static struct hlsl_scope *get_loop_scope(struct hlsl_scope *scope) %token KW_RWTEXTURE1D %token KW_RWTEXTURE1DARRAY %token KW_RWTEXTURE2D +%token KW_RWTEXTURE2DARRAY %token KW_RWTEXTURE3D %token KW_SAMPLER %token KW_SAMPLER1D @@ -5556,6 +5557,10 @@ uav_type: { $$ = HLSL_SAMPLER_DIM_2D; } + | KW_RWTEXTURE2DARRAY + { + $$ = HLSL_SAMPLER_DIM_2DARRAY; + } | KW_RWTEXTURE3D { $$ = HLSL_SAMPLER_DIM_3D; @@ -5704,6 +5709,7 @@ type_no_void: case HLSL_SAMPLER_DIM_1D: case HLSL_SAMPLER_DIM_1DARRAY: case HLSL_SAMPLER_DIM_2D: + case HLSL_SAMPLER_DIM_2DARRAY: case HLSL_SAMPLER_DIM_3D: if ($3->class == HLSL_CLASS_ARRAY) { diff --git a/tests/hlsl/uav-rwtexture.shader_test b/tests/hlsl/uav-rwtexture.shader_test index 46cbe7ab4..76535bd59 100644 --- a/tests/hlsl/uav-rwtexture.shader_test +++ b/tests/hlsl/uav-rwtexture.shader_test @@ -217,7 +217,7 @@ float4 main() : sv_target1 }
% RWTexture2DArray types -[pixel shader fail(sm>=6) todo] +[pixel shader fail(sm>=6)] struct s { float3 a;