radeonsi: reset more fields in si_llvm_context_set_ir to fix reusing ctx
authorMarek Olšák <marek.olsak@amd.com>
Thu, 12 Dec 2019 22:13:23 +0000 (17:13 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Dec 2019 20:06:07 +0000 (20:06 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>

src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

index ed3f89c7a25cb08f47c930e94bc60988f976fd33..1443432d59364bcbedca06995020b35bada99f55 100644 (file)
@@ -1071,6 +1071,8 @@ void si_llvm_context_set_ir(struct si_shader_context *ctx,
        /* Re-set these to start with a clean slate. */
        ctx->bld_base.num_instructions = 0;
        ctx->bld_base.pc = 0;
+       memset(ctx->input_decls, 0, sizeof(ctx->input_decls));
+       memset(ctx->inputs, 0, sizeof(ctx->inputs));
        memset(ctx->outputs, 0, sizeof(ctx->outputs));
 
        ctx->bld_base.emit_store = si_llvm_emit_store;