diff options
author | Timothy Arceri <[email protected]> | 2016-10-19 09:15:57 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | 9d2b391165e64f3c64021e5a563037e0ccc09d84 (patch) | |
tree | 9f1849a81c187cd412762f8ea17567ecb56f3ef5 /src/mesa/state_tracker | |
parent | debed12fdde9766fd9cf99d679207a36a4599a82 (diff) |
glsl: add temporary copy_shader_info() function
This function is added here to ease refactoring towards using the new shared
shader_info. Once refactoring is complete and values are set directly it
will be removed.
We call it from _mesa_copy_linked_program_data() rather than glsl_to_nir()
so that the values will be set for all drivers. In order to do this some
calls need to be moved around so that we make sure to call
do_set_program_inouts() before _mesa_copy_linked_program_data()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 97fef082c04..303b36e9467 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -382,6 +382,8 @@ st_nir_get_mesa_program(struct gl_context *ctx, prog->Parameters = _mesa_new_parameter_list(); + do_set_program_inouts(shader->ir, prog, shader->Stage); + _mesa_copy_linked_program_data(shader_program, shader); _mesa_generate_parameters_list_for_uniforms(shader_program, shader, prog->Parameters); @@ -421,8 +423,6 @@ st_nir_get_mesa_program(struct gl_context *ctx, prog->Instructions = NULL; prog->NumInstructions = 0; - do_set_program_inouts(shader->ir, prog, shader->Stage); - 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 b2bd2152488..4d2b1f60ebb 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6397,7 +6397,6 @@ get_mesa_program_tgsi(struct gl_context *ctx, v->have_fma = pscreen->get_shader_param(pscreen, ptarget, PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED); - _mesa_copy_linked_program_data(shader_program, shader); _mesa_generate_parameters_list_for_uniforms(shader_program, shader, prog->Parameters); @@ -6467,6 +6466,7 @@ get_mesa_program_tgsi(struct gl_context *ctx, 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, &prog->InputsRead, prog->DoubleInputsRead, &prog->PatchInputsRead); shrink_array_declarations(v->outputs, v->num_outputs, |