summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-04-19 15:37:49 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-04-26 16:04:53 +0200
commit4a964c2221698e598913768030cd57faa0451c9e (patch)
tree7d98ceb6e3be908cd7fd255f4de46493ba8d0c86
parent91571c40b15be1159e77747859679f919fbef9f6 (diff)
mesa: keep track of the current variable in add_uniform_to_shader
Bindless samplers are considered PROGRAM_UNIFORM but add_uniform_to_shader::visit_field() is based on glsl_type. Because only ir_variable knows if the uniform variable is bindless via ir_variable::bindless, store it instead of adding a new parameter to visit_field(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
-rw-r--r--src/mesa/program/ir_to_mesa.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 640b95edba..f2d1231250 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2426,6 +2426,7 @@ public:
void process(ir_variable *var)
{
this->idx = -1;
+ this->var = var;
this->program_resource_visitor::process(var);
var->data.param_index = this->idx;
}
@@ -2439,6 +2440,7 @@ private:
struct gl_shader_program *shader_program;
struct gl_program_parameter_list *params;
int idx;
+ ir_variable *var;
gl_shader_stage shader_type;
};