vkd3d-shader/hlsl: Add RenderTargetView object type.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-02-08 17:00:30 +01:00 committed by Alexandre Julliard
parent 9c678532a7
commit c2b1714c5c
Notes: Alexandre Julliard 2024-02-22 23:03:49 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/660
3 changed files with 8 additions and 0 deletions

View File

@ -3521,6 +3521,9 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
type->e.version = technique_types[i].version; type->e.version = technique_types[i].version;
hlsl_scope_add_type(ctx->globals, type); hlsl_scope_add_type(ctx->globals, type);
} }
type = hlsl_new_type(ctx, "RenderTargetView", HLSL_CLASS_OBJECT, HLSL_TYPE_RENDERTARGETVIEW, 1, 1);
hlsl_scope_add_type(ctx->globals, type);
} }
static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const struct vkd3d_shader_compile_info *compile_info, static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const struct vkd3d_shader_compile_info *compile_info,

View File

@ -96,6 +96,7 @@ enum hlsl_base_type
HLSL_TYPE_PIXELSHADER, HLSL_TYPE_PIXELSHADER,
HLSL_TYPE_VERTEXSHADER, HLSL_TYPE_VERTEXSHADER,
HLSL_TYPE_PASS, HLSL_TYPE_PASS,
HLSL_TYPE_RENDERTARGETVIEW,
HLSL_TYPE_TECHNIQUE, HLSL_TYPE_TECHNIQUE,
HLSL_TYPE_EFFECT_GROUP, HLSL_TYPE_EFFECT_GROUP,
HLSL_TYPE_STRING, HLSL_TYPE_STRING,

View File

@ -6446,6 +6446,10 @@ type_no_void:
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_REDEFINED, "\"%s\" redefined as a structure.", $2); hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_REDEFINED, "\"%s\" redefined as a structure.", $2);
vkd3d_free($2); vkd3d_free($2);
} }
| KW_RENDERTARGETVIEW
{
$$ = hlsl_get_type(ctx->cur_scope, "RenderTargetView", true, true);
}
type: type:
type_no_void type_no_void