[Mesa-dev] [PATCH 8/9] mesa: remove unused parameter/member of add_uniform_to_shader
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jun 26 09:40:46 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/mesa/program/ir_to_mesa.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 3ed5bed..ac12b59 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2402,24 +2402,22 @@ print_program(struct prog_instruction *mesa_instructions,
indent = _mesa_fprint_instruction_opt(stdout, mesa_inst, indent,
PROG_PRINT_DEBUG, NULL);
}
}
namespace {
class add_uniform_to_shader : public program_resource_visitor {
public:
add_uniform_to_shader(struct gl_shader_program *shader_program,
- struct gl_program_parameter_list *params,
- gl_shader_stage shader_type)
- : shader_program(shader_program), params(params), idx(-1),
- shader_type(shader_type)
+ struct gl_program_parameter_list *params)
+ : shader_program(shader_program), params(params), idx(-1)
{
/* empty */
}
void process(ir_variable *var)
{
this->idx = -1;
this->var = var;
this->program_resource_visitor::process(var);
var->data.param_index = this->idx;
@@ -2428,21 +2426,20 @@ public:
private:
virtual void visit_field(const glsl_type *type, const char *name,
bool row_major, const glsl_type *record_type,
const enum glsl_interface_packing packing,
bool last_field);
struct gl_shader_program *shader_program;
struct gl_program_parameter_list *params;
int idx;
ir_variable *var;
- gl_shader_stage shader_type;
};
} /* anonymous namespace */
void
add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
bool /* row_major */,
const glsl_type * /* record_type */,
const enum glsl_interface_packing,
bool /* last_field */)
@@ -2475,21 +2472,21 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
* \param sh Shader whose uniforms are to be processed.
* \param params Parameter list to be filled in.
*/
void
_mesa_generate_parameters_list_for_uniforms(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, sh->Stage);
+ add_uniform_to_shader add(shader_program, params);
foreach_in_list(ir_instruction, node, sh->ir) {
ir_variable *var = node->as_variable();
if ((var == NULL) || (var->data.mode != ir_var_uniform)
|| var->is_in_buffer_block() || (strncmp(var->name, "gl_", 3) == 0))
continue;
add.process(var);
}
--
2.9.3
More information about the mesa-dev
mailing list