diff options
author | Timothy Arceri <[email protected]> | 2017-08-22 20:31:57 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-08-22 21:25:55 +1000 |
commit | da28280544139ff58124224863c69211a50e37ec (patch) | |
tree | 3e6a930381290f556fffce25b7f111b7a404be21 /src/mesa/program | |
parent | 640b6e607cb25d0ccc2bf1a1c609f497eb10f673 (diff) |
mesa: pass ctx to add_uniform_to_shader constructor
Fixes: 4c2422067b5c ("glsl: pass UseSTD430AsDefaultPacking to where it will be used")
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 10 | ||||
-rw-r--r-- | src/mesa/program/ir_to_mesa.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index c168162b572..78f24498783 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2416,7 +2416,8 @@ namespace { class add_uniform_to_shader : public program_resource_visitor { public: - add_uniform_to_shader(struct gl_shader_program *shader_program, + add_uniform_to_shader(struct gl_context *ctx, + struct gl_shader_program *shader_program, struct gl_program_parameter_list *params) : ctx(ctx), params(params), idx(-1) { @@ -2482,13 +2483,14 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name, * \param params Parameter list to be filled in. */ void -_mesa_generate_parameters_list_for_uniforms(struct gl_shader_program +_mesa_generate_parameters_list_for_uniforms(struct gl_context *ctx, + struct gl_shader_program *shader_program, struct gl_linked_shader *sh, struct gl_program_parameter_list *params) { - add_uniform_to_shader add(shader_program, params); + add_uniform_to_shader add(ctx, shader_program, params); foreach_in_list(ir_instruction, node, sh->ir) { ir_variable *var = node->as_variable(); @@ -2850,7 +2852,7 @@ get_mesa_program(struct gl_context *ctx, v.shader_program = shader_program; v.options = options; - _mesa_generate_parameters_list_for_uniforms(shader_program, shader, + _mesa_generate_parameters_list_for_uniforms(ctx, shader_program, shader, prog->Parameters); /* Emit Mesa IR for main(). */ diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h index e3d364455cf..9714f50443a 100644 --- a/src/mesa/program/ir_to_mesa.h +++ b/src/mesa/program/ir_to_mesa.h @@ -38,7 +38,8 @@ void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *pr GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog); void -_mesa_generate_parameters_list_for_uniforms(struct gl_shader_program +_mesa_generate_parameters_list_for_uniforms(struct gl_context *ctx, + struct gl_shader_program *shader_program, struct gl_linked_shader *sh, struct gl_program_parameter_list |