Module: vkd3d Branch: master Commit: c2b1714c5ca4c6c750067b0e7ce253b807e59e0f URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/c2b1714c5ca4c6c750067b0e7ce253...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Feb 8 17:00:30 2024 +0100
vkd3d-shader/hlsl: Add RenderTargetView object type.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
libs/vkd3d-shader/hlsl.c | 3 +++ libs/vkd3d-shader/hlsl.h | 1 + libs/vkd3d-shader/hlsl.y | 4 ++++ 3 files changed, 8 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 353e34d2..fffac6bc 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -3521,6 +3521,9 @@ static void declare_predefined_types(struct hlsl_ctx *ctx) type->e.version = technique_types[i].version; 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, diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 5b73857b..425ccfe7 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -96,6 +96,7 @@ enum hlsl_base_type HLSL_TYPE_PIXELSHADER, HLSL_TYPE_VERTEXSHADER, HLSL_TYPE_PASS, + HLSL_TYPE_RENDERTARGETVIEW, HLSL_TYPE_TECHNIQUE, HLSL_TYPE_EFFECT_GROUP, HLSL_TYPE_STRING, diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index b59dbf32..88904832 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -6446,6 +6446,10 @@ type_no_void: hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_REDEFINED, ""%s" redefined as a structure.", $2); vkd3d_free($2); } + | KW_RENDERTARGETVIEW + { + $$ = hlsl_get_type(ctx->cur_scope, "RenderTargetView", true, true); + }
type: type_no_void