From d6bdb3a86293da2164e9355f0262ef83afeece7f Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 17 Nov 2016 10:51:19 +1100 Subject: [PATCH] st/mesa: stop initialing Instructions and NumInstructions Since gl_program is now created with rzalloc() they should already be initialised. Reviewed-by: Emil Velikov --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index a4128064189..36531ad3047 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -417,9 +417,6 @@ st_nir_get_mesa_program(struct gl_context *ctx, _mesa_log("\n\n"); } - prog->Instructions = NULL; - prog->NumInstructions = 0; - prog->SamplersUsed = shader->active_samplers; prog->ShadowSamplers = shader->shadow_samplers; prog->ExternalSamplersUsed = gl_external_samplers(shader); diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 7f19839d30e..7d67a598f0a 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6501,9 +6501,6 @@ get_mesa_program_tgsi(struct gl_context *ctx, _mesa_log("\n\n"); } - prog->Instructions = NULL; - prog->NumInstructions = 0; - do_set_program_inouts(shader->ir, prog, shader->Stage); _mesa_copy_linked_program_data(shader_program, shader); shrink_array_declarations(v->inputs, v->num_inputs, -- 2.30.2