summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 14:49:48 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commite40d32b3ec0793b475004b8f36b17f1493806271 (patch)
tree7064257c277e14a14e8c261973581efd8b827180 /src/mesa/drivers
parent68db0fe0346386c8d231eb81da6340b24b7878b0 (diff)
mesa: modify _mesa_copy_linked_program_data() to take gl_linked_shader
This allows us to do some small tidy ups, but will also allow us to call a new function that copies values to a shared shader info from here. In order to make this change this function now requires _mesa_reference_program() to have previously been called. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 5ea97736fa8..f0e504d99ab 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -226,9 +226,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
0);
if (!prog)
return false;
+
+ _mesa_reference_program(ctx, &shader->Program, prog);
+
prog->Parameters = _mesa_new_parameter_list();
- _mesa_copy_linked_program_data((gl_shader_stage) stage, shProg, prog);
+ _mesa_copy_linked_program_data(shProg, shader);
process_glsl_ir(brw, shProg, shader);
@@ -261,8 +264,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
prog->ShadowSamplers = shader->shadow_samplers;
_mesa_update_shader_textures_used(shProg, prog);
- _mesa_reference_program(ctx, &shader->Program, prog);
-
brw_add_texrect_params(prog);
prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) stage,