vkd3d-shader/hlsl: Add temporary variables to "dummy_scope" in prepend_uniform_copy().

These are not looked up by name, so we don't need them in a specific scope.

Moreover, since we generate the temporaries using the same storage
modifiers as the uniforms, hlsl_emit_bytecode() will treat them as new
uniforms if run multiple times. That function is currently only run
once, but this will change when compiling shaders in effects.
This commit is contained in:
Anna (navi) Figueiredo Gomes
2025-07-02 23:09:32 +02:00
committed by Henri Verbeet
parent 66895e2605
commit f4d95af91d
Notes: Henri Verbeet 2025-07-23 17:30:00 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1471

View File

@@ -201,7 +201,7 @@ static void prepend_uniform_copy(struct hlsl_ctx *ctx, struct hlsl_block *block,
vkd3d_free(new_name); vkd3d_free(new_name);
return; return;
} }
list_add_before(&uniform->scope_entry, &temp->scope_entry); list_add_tail(&ctx->dummy_scope->vars, &temp->scope_entry);
uniform->temp_copy = temp; uniform->temp_copy = temp;