On 3/23/21 4:35 PM, Matteo Bruni wrote:
On Mon, Mar 22, 2021 at 11:03 PM Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl_codegen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 595e7da6..21bd9ab8 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -398,7 +398,8 @@ static void compute_liveness(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl
LIST_FOR_EACH_ENTRY(var, &ctx->globals->vars, struct hlsl_ir_var, scope_entry) {
var->first_write = 1;
if (var->is_uniform)
}var->first_write = 1;
Some light testing suggests that static variables are implicitly initialized to 0, like in C.
Yes, that's correct. I believe we should handle that by generating explicit assignments, which means that there's no need to handle it specially when calculating liveness.