diff options
author | Brian Paul <brianp@vmware.com> | 2010-12-08 18:25:38 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-12-08 18:25:38 -0700 |
commit | 7ce186358e881d1e30eda716a8dea73d2dab2ee9 (patch) | |
tree | 23d4f89f1ff2e5d69745f0423827f5c39b9218d5 /src/glsl/ir_set_program_inouts.cpp | |
parent | 379332f629153220614e651225b0521cd64c98b9 (diff) | |
download | external_mesa3d-7ce186358e881d1e30eda716a8dea73d2dab2ee9.zip external_mesa3d-7ce186358e881d1e30eda716a8dea73d2dab2ee9.tar.gz external_mesa3d-7ce186358e881d1e30eda716a8dea73d2dab2ee9.tar.bz2 |
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.cpp | 9 |
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 b3f1cc0..31a122c 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); } |