aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
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/state_tracker/st_glsl_to_tgsi.cpp
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/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index f3764623d50..b2bd2152488 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6379,6 +6379,9 @@ get_mesa_program_tgsi(struct gl_context *ctx,
prog = ctx->Driver.NewProgram(ctx, target, shader_program->Name);
if (!prog)
return NULL;
+
+ _mesa_reference_program(ctx, &shader->Program, prog);
+
prog->Parameters = _mesa_new_parameter_list();
v = new glsl_to_tgsi_visitor();
v->ctx = ctx;
@@ -6394,7 +6397,7 @@ 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->Stage, shader_program, prog);
+ _mesa_copy_linked_program_data(shader_program, shader);
_mesa_generate_parameters_list_for_uniforms(shader_program, shader,
prog->Parameters);
@@ -6486,8 +6489,6 @@ get_mesa_program_tgsi(struct gl_context *ctx,
wposTransformState);
}
- _mesa_reference_program(ctx, &shader->Program, prog);
-
/* Avoid reallocation of the program parameter list, because the uniform
* storage is only associated with the original parameter list.
* This should be enough for Bitmap and DrawPixels constants.