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/drivers | |
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/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_link.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index f0e504d99ab..f75b384d673 100644 --- a/src/mesa/drivers/dri/i965/brw_link.cpp +++ b/src/mesa/drivers/dri/i965/brw_link.cpp @@ -231,10 +231,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) prog->Parameters = _mesa_new_parameter_list(); - _mesa_copy_linked_program_data(shProg, shader); - process_glsl_ir(brw, shProg, shader); + do_set_program_inouts(shader->ir, prog, shader->Stage); + + _mesa_copy_linked_program_data(shProg, shader); + /* Make a pass over the IR to add state references for any built-in * uniforms that are used. This has to be done now (during linking). * Code generation doesn't happen until the first time this shader is @@ -258,8 +260,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) } } - do_set_program_inouts(shader->ir, prog, shader->Stage); - prog->SamplersUsed = shader->active_samplers; prog->ShadowSamplers = shader->shadow_samplers; _mesa_update_shader_textures_used(shProg, prog); |