Module: vkd3d Branch: master Commit: 2c71c188796b3c79b96b1b8bcc52970c333afbb3 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/2c71c188796b3c79b96b1b8bcc5297...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Oct 18 22:49:18 2023 +0200
vkd3d-shader/hlsl: Add support for RWTexture1DArray.
---
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 90abd64a..e3da914e 100644 --- a/libs/vkd3d-shader/hlsl.l +++ b/libs/vkd3d-shader/hlsl.l @@ -109,6 +109,7 @@ register {return KW_REGISTER; } RWBuffer {return KW_RWBUFFER; } RWStructuredBuffer {return KW_RWSTRUCTUREDBUFFER; } RWTexture1D {return KW_RWTEXTURE1D; } +RWTexture1DArray {return KW_RWTEXTURE1DARRAY; } RWTexture2D {return KW_RWTEXTURE2D; } RWTexture3D {return KW_RWTEXTURE3D; } sampler {return KW_SAMPLER; } diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index ba738473..7d645ce9 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -4722,6 +4722,7 @@ static struct hlsl_scope *get_loop_scope(struct hlsl_scope *scope) %token KW_RWBUFFER %token KW_RWSTRUCTUREDBUFFER %token KW_RWTEXTURE1D +%token KW_RWTEXTURE1DARRAY %token KW_RWTEXTURE2D %token KW_RWTEXTURE3D %token KW_SAMPLER @@ -5547,6 +5548,10 @@ uav_type: { $$ = HLSL_SAMPLER_DIM_1D; } + | KW_RWTEXTURE1DARRAY + { + $$ = HLSL_SAMPLER_DIM_1DARRAY; + } | KW_RWTEXTURE2D { $$ = HLSL_SAMPLER_DIM_2D; @@ -5697,6 +5702,7 @@ type_no_void: { case HLSL_SAMPLER_DIM_BUFFER: case HLSL_SAMPLER_DIM_1D: + case HLSL_SAMPLER_DIM_1DARRAY: case HLSL_SAMPLER_DIM_2D: 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 79cb47de..8029eef8 100644 --- a/tests/hlsl/uav-rwtexture.shader_test +++ b/tests/hlsl/uav-rwtexture.shader_test @@ -181,7 +181,7 @@ float4 main() : sv_target1 }
% RWTexture1DArray types -[pixel shader fail(sm>=6) todo] +[pixel shader fail(sm>=6)] struct s { float3 a;