glsl: Drop exec_list argument to lower_ubo_reference
authorKristian Høgsberg Kristensen <krh@bitplanet.net>
Wed, 4 Nov 2015 22:50:51 +0000 (14:50 -0800)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Tue, 10 Nov 2015 20:02:46 +0000 (12:02 -0800)
We always pass in shader->ir and we already pass in the shader, so just
drop the exec_list. Most passes either take just a exec_list or a
shader, so this seems more consistent.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
src/glsl/ir_optimization.h
src/glsl/lower_ubo_reference.cpp
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index ce5c4929bfb0000458cb0679094c1e81b7f89e8a..6d19a6ca4761365a0636f81efa3b8dc514de958e 100644 (file)
@@ -124,7 +124,7 @@ bool lower_const_arrays_to_uniforms(exec_list *instructions);
 bool lower_clip_distance(gl_shader *shader);
 void lower_output_reads(unsigned stage, exec_list *instructions);
 bool lower_packing_builtins(exec_list *instructions, int op_mask);
-void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions);
+void lower_ubo_reference(struct gl_shader *shader);
 void lower_packed_varyings(void *mem_ctx,
                            unsigned locations_used, ir_variable_mode mode,
                            unsigned gs_input_vertices, gl_shader *shader);
index 57a242b4074c01697c437fd50027f2deb44d3670..24806ac6ce911b43622d909ce0f9dc5f56c7e5bc 100644 (file)
@@ -1270,7 +1270,7 @@ lower_ubo_reference_visitor::visit_enter(ir_call *ir)
 } /* unnamed namespace */
 
 void
-lower_ubo_reference(struct gl_shader *shader, exec_list *instructions)
+lower_ubo_reference(struct gl_shader *shader)
 {
    lower_ubo_reference_visitor v(shader);
 
@@ -1281,6 +1281,6 @@ lower_ubo_reference(struct gl_shader *shader, exec_list *instructions)
     */
    do {
       v.progress = false;
-      visit_list_elements(&v, instructions);
+      visit_list_elements(&v, shader->ir);
    } while (v.progress);
 }
index fc9bee43d80cc56df968629ce44899f491c9ae3a..f1e386059356c28ec3cc21d9eba270e38138997a 100644 (file)
@@ -157,7 +157,7 @@ process_glsl_ir(gl_shader_stage stage,
                  _mesa_shader_stage_to_abbrev(shader->Stage));
    }
 
-   lower_ubo_reference(shader, shader->ir);
+   lower_ubo_reference(shader);
 
    bool progress;
    do {
index f481e8902d88917a2c83067a6434726a118ebe7f..ca00930e26119fc3fcb662a563a19a5080fb9b74 100644 (file)
@@ -5822,7 +5822,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
                          (!ctx->Const.NativeIntegers ? INT_DIV_TO_MUL_RCP : 0) |
                          (options->EmitNoSat ? SAT_TO_CLAMP : 0));
 
-      lower_ubo_reference(prog->_LinkedShaders[i], ir);
+      lower_ubo_reference(prog->_LinkedShaders[i]);
       do_vec_index_to_cond_assign(ir);
       lower_vector_insert(ir, true);
       lower_quadop_vector(ir, false);