diff options
author | Ian Romanick <[email protected]> | 2011-03-24 18:31:05 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-03-29 13:21:09 -0700 |
commit | a99e80d795f7c6aec0e73369a31d1728577b9727 (patch) | |
tree | 599ced4affa100df44ab69ab753bbd784975060e /src/mesa/program/ir_to_mesa.cpp | |
parent | 89d81ab16c05818b290ed735c1343d3abde449bf (diff) |
mesa: Fix ugly indentation left from previous commit
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 4cca2b72460..bf2513d4748 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -795,26 +795,25 @@ ir_to_mesa_visitor::visit(ir_variable *ir) } - { - for (unsigned int i = 0; i < ir->num_state_slots; i++) { - int index = _mesa_add_state_reference(this->prog->Parameters, - (gl_state_index *)slots[i].tokens); - - if (storage->file == PROGRAM_STATE_VAR) { - if (storage->index == -1) { - storage->index = index; - } else { - assert(index == storage->index + (int)i); - } + for (unsigned int i = 0; i < ir->num_state_slots; i++) { + int index = _mesa_add_state_reference(this->prog->Parameters, + (gl_state_index *)slots[i].tokens); + + if (storage->file == PROGRAM_STATE_VAR) { + if (storage->index == -1) { + storage->index = index; } else { - ir_to_mesa_src_reg src(PROGRAM_STATE_VAR, index, NULL); - src.swizzle = slots[i].swizzle; - ir_to_mesa_emit_op1(ir, OPCODE_MOV, dst, src); - /* even a float takes up a whole vec4 reg in a struct/array. */ - dst.index++; + assert(index == storage->index + (int)i); } + } else { + ir_to_mesa_src_reg src(PROGRAM_STATE_VAR, index, NULL); + src.swizzle = slots[i].swizzle; + ir_to_mesa_emit_op1(ir, OPCODE_MOV, dst, src); + /* even a float takes up a whole vec4 reg in a struct/array. */ + dst.index++; } } + if (storage->file == PROGRAM_TEMPORARY && dst.index != storage->index + ir->num_state_slots) { fail_link(this->shader_program, |