From e8354ac499fec05e6756cb94a8d67652ea8f34ce Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Wed, 17 Jul 2024 15:51:08 -0400 Subject: [PATCH] vkd3d-shader/hlsl: Parse string type. --- libs/vkd3d-shader/hlsl.y | 4 ++++ libs/vkd3d-shader/hlsl_codegen.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index ca0cf76b..02975628 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -7309,6 +7309,10 @@ type_no_void: validate_uav_type(ctx, $1, $3, &@3); $$ = hlsl_new_uav_type(ctx, $1, $3, true); } + | KW_STRING + { + $$ = ctx->builtin_types.string; + } | TYPE_IDENTIFIER { $$ = hlsl_get_type(ctx->cur_scope, $1, true, true); diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index f460e10e..7fd4bed6 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1638,6 +1638,7 @@ static bool copy_propagation_transform_load(struct hlsl_ctx *ctx, case HLSL_CLASS_PIXEL_SHADER: case HLSL_CLASS_RASTERIZER_STATE: case HLSL_CLASS_SAMPLER: + case HLSL_CLASS_STRING: case HLSL_CLASS_TEXTURE: case HLSL_CLASS_UAV: case HLSL_CLASS_VERTEX_SHADER: @@ -1658,7 +1659,6 @@ static bool copy_propagation_transform_load(struct hlsl_ctx *ctx, case HLSL_CLASS_EFFECT_GROUP: case HLSL_CLASS_PASS: case HLSL_CLASS_RENDER_TARGET_VIEW: - case HLSL_CLASS_STRING: case HLSL_CLASS_TECHNIQUE: case HLSL_CLASS_VOID: vkd3d_unreachable();