Francisco Casas : vkd3d-shader/hlsl: Parse valid texture array types.

Alexandre Julliard julliard at winehq.org
Wed Feb 9 16:03:04 CST 2022


Module: vkd3d
Branch: master
Commit: b78087c20fd775d3b2b8b89648d293256669a8bb
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=b78087c20fd775d3b2b8b89648d293256669a8bb

Author: Francisco Casas <fcasas at codeweavers.com>
Date:   Thu Jan 27 15:31:26 2022 -0300

vkd3d-shader/hlsl: Parse valid texture array types.

Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 a37e5d8..c1edfe7 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 4434648..40fdd49 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -2172,6 +2172,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
@@ -2716,6 +2717,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 '>'




More information about the wine-cvs mailing list