Signed-off-by: Francisco Casas fcasas@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@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 '>'
Looks fine, but as long as you're resending anyway, you might as well add Texture3DArray.
December 17, 2021 8:36 PM, "Zebediah Figura (she/her)" zfigura@codeweavers.com wrote:
Looks fine, but as long as you're resending anyway, you might as well add Texture3DArray.
AFAIK Texture3DArrays don't exist, as loading from them would require 5 dimensions: X, Y, Z, slice and mipmap.
On 12/20/21 11:22, Francisco Casas wrote:
December 17, 2021 8:36 PM, "Zebediah Figura (she/her)" zfigura@codeweavers.com wrote:
Looks fine, but as long as you're resending anyway, you might as well add Texture3DArray.
AFAIK Texture3DArrays don't exist, as loading from them would require 5 dimensions: X, Y, Z, slice and mipmap.
Hrm, I thought they existed but that you just couldn't load from them, only sample. Turns out I was wrong.
We should probably remove it from the lexer in that case, then.