[PATCH vkd3d v3 09/12] vkd3d-shader/hlsl: Parse texture array types.
Francisco Casas
fcasas at codeweavers.com
Fri Dec 17 13:12:51 CST 2021
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 e9281ec3..126cad30 100644
--- a/libs/vkd3d-shader/hlsl.l
+++ b/libs/vkd3d-shader/hlsl.l
@@ -134,6 +134,7 @@ Texture3D {return KW_TEXTURE3D; }
Texture3DArray {return KW_TEXTURE3DARRAY; }
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 9aa0138d..b7446454 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2148,6 +2148,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl
%token KW_TEXTURE3D
%token KW_TEXTURE3DARRAY
%token KW_TEXTURECUBE
+%token KW_TEXTURECUBEARRAY
%token KW_TRUE
%token KW_TYPEDEF
%token KW_UNIFORM
@@ -2692,6 +2693,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