From: Marek Olšák Date: Thu, 12 Dec 2019 22:13:23 +0000 (-0500) Subject: radeonsi: reset more fields in si_llvm_context_set_ir to fix reusing ctx X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8edf3df3e42da12f2bc14afeaaba5852eb05040d;p=mesa.git radeonsi: reset more fields in si_llvm_context_set_ir to fix reusing ctx Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index ed3f89c7a25..1443432d593 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -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;