From 8edf3df3e42da12f2bc14afeaaba5852eb05040d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 12 Dec 2019 17:13:23 -0500 Subject: [PATCH] radeonsi: reset more fields in si_llvm_context_set_ir to fix reusing ctx Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.30.2