summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-12-08 18:25:38 -0700
committerBrian Paul <[email protected]>2010-12-08 18:25:38 -0700
commit7ce186358e881d1e30eda716a8dea73d2dab2ee9 (patch)
tree23d4f89f1ff2e5d69745f0423827f5c39b9218d5 /src/glsl/ir_set_program_inouts.cpp
parent379332f629153220614e651225b0521cd64c98b9 (diff)
glsl: add support for system values and GL_ARB_draw_instanced
Diffstat (limited to 'src/glsl/ir_set_program_inouts.cpp')
-rw-r--r--src/glsl/ir_set_program_inouts.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index b3f1cc0d8b5..31a122c6bb9 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -90,7 +90,10 @@ mark(struct gl_program *prog, ir_variable *var, int index)
index *= element_size;
for (int i = 0; i < element_size; i++) {
- if (var->mode == ir_var_in)
+ if (var->mode == ir_var_system_value) {
+ prog->SystemValuesRead |= (1 << (var->location + index + i));
+ }
+ else if (var->mode == ir_var_in)
prog->InputsRead |= BITFIELD64_BIT(var->location + index + i);
else
prog->OutputsWritten |= BITFIELD64_BIT(var->location + index + i);
@@ -139,7 +142,8 @@ ir_visitor_status
ir_set_program_inouts_visitor::visit(ir_variable *ir)
{
if (ir->mode == ir_var_in ||
- ir->mode == ir_var_out) {
+ ir->mode == ir_var_out ||
+ ir->mode == ir_var_system_value) {
hash_table_insert(this->ht, ir, ir);
}
@@ -163,5 +167,6 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog)
prog->InputsRead = 0;
prog->OutputsWritten = 0;
+ prog->SystemValuesRead = 0;
visit_list_elements(&v, instructions);
}