summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
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,