[PATCH vkd3d v5 6/6] vkd3d-shader/hlsl: Parse valid texture array types.
Francisco Casas
fcasas at codeweavers.com
Thu Jan 27 12:31:26 CST 2022
Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
---
Multisampled objects, namely Texture2DMS and Texture2DMSArray are
not parsed yet since they require a different type of declaration,
with the number of samples stated expicitly.
Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
---
libs/vkd3d-shader/hlsl.l | 1 +
libs/vkd3d-shader/hlsl.y | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l
index a37e5d88..c1edfe7e 100644
--- a/libs/vkd3d-shader/hlsl.l
+++ b/libs/vkd3d-shader/hlsl.l
@@ -133,6 +133,7 @@ texture3D {return KW_TEXTURE3D; }
Texture3D {return KW_TEXTURE3D; }
textureCUBE {return KW_TEXTURECUBE; }
TextureCube {return KW_TEXTURECUBE; }
+TextureCubeArray {return KW_TEXTURECUBEARRAY; }
true {return KW_TRUE; }
typedef {return KW_TYPEDEF; }
uniform {return KW_UNIFORM; }
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index ec688764..42cad016 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2138,6 +2138,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl
%token KW_TEXTURE2DMSARRAY
%token KW_TEXTURE3D
%token KW_TEXTURECUBE
+%token KW_TEXTURECUBEARRAY
%token KW_TRUE
%token KW_TYPEDEF
%token KW_UNIFORM
@@ -2682,6 +2683,18 @@ texture_type:
{
$$ = HLSL_SAMPLER_DIM_CUBE;
}
+ | KW_TEXTURE1DARRAY
+ {
+ $$ = HLSL_SAMPLER_DIM_1DARRAY;
+ }
+ | KW_TEXTURE2DARRAY
+ {
+ $$ = HLSL_SAMPLER_DIM_2DARRAY;
+ }
+ | KW_TEXTURECUBEARRAY
+ {
+ $$ = HLSL_SAMPLER_DIM_CUBEARRAY;
+ }
type:
KW_VECTOR '<' type ',' C_INTEGER '>'
--
2.25.1
More information about the wine-devel
mailing list