st/mesa: stop initialing Instructions and NumInstructions
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 16 Nov 2016 23:51:19 +0000 (10:51 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 17 Nov 2016 01:52:59 +0000 (12:52 +1100)
Since gl_program is now created with rzalloc() they should
already be initialised.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index a4128064189fc35ebb2dd2c418ed23f0c0c3c8a2..36531ad3047766a36e10703d413266d4937113f1 100644 (file)
@@ -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);
index 7f19839d30e3b25cc9ae9d9f151e2810cb031da7..7d67a598f0a3c45ceea26167270ba4c3026f79b7 100644 (file)
@@ -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,