[PATCH vkd3d v4 08/10] vkd3d-shader/hlsl: Parse texture array types.
Francisco Casas
fcasas at codeweavers.com
Tue Dec 21 07:04:22 CST 2021
Also, remove Texture3DArrays from the lexer since they don't exist.
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 | 2 +-
libs/vkd3d-shader/hlsl.y | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l
index e9281ec3..c1edfe7e 100644
--- a/libs/vkd3d-shader/hlsl.l
+++ b/libs/vkd3d-shader/hlsl.l
@@ -131,9 +131,9 @@ Texture2DMS {return KW_TEXTURE2DMS; }
Texture2DMSArray {return KW_TEXTURE2DMSARRAY; }
texture3D {return KW_TEXTURE3D; }
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 0fd6b9a3..ae64bbd6 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2126,8 +2126,8 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl
%token KW_TEXTURE2DMS
%token KW_TEXTURE2DMSARRAY
%token KW_TEXTURE3D
-%token KW_TEXTURE3DARRAY
%token KW_TEXTURECUBE
+%token KW_TEXTURECUBEARRAY
%token KW_TRUE
%token KW_TYPEDEF
%token KW_UNIFORM
@@ -2672,6 +2672,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