vkd3d-shader: Keep track of the buffer in which a variable was defined.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-06-21 23:37:10 -05:00
committed by Alexandre Julliard
parent 4695690ac8
commit dbfe63d6a1
4 changed files with 20 additions and 5 deletions

View File

@@ -1599,8 +1599,14 @@ static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const struct hlsl_profile_info *
list_init(&ctx->static_initializers);
list_init(&ctx->extern_vars);
list_init(&ctx->buffers);
if (!(ctx->globals_buffer = hlsl_new_buffer(ctx, HLSL_BUFFER_CONSTANT,
hlsl_strdup(ctx, "$Globals"), NULL, ctx->location)))
return false;
ctx->cur_buffer = ctx->globals_buffer;
return true;
}