mesa: Fix ugly indentation left from previous commit
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Mar 2011 01:31:05 +0000 (18:31 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 29 Mar 2011 20:21:09 +0000 (13:21 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/program/ir_to_mesa.cpp

index cf05fb4..bea6b18 100644 (file)
@@ -402,31 +402,29 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
    const ir_state_slot *const slots = ir->state_slots;
    assert(ir->state_slots != NULL);
 
-   {
-      for (unsigned int i = 0; i < ir->num_state_slots; i++) {
-        /* This state reference has already been setup by ir_to_mesa,
-         * but we'll get the same index back here.
-         */
-        int index = _mesa_add_state_reference(this->fp->Base.Parameters,
-                                              (gl_state_index *)slots[i].tokens);
+   for (unsigned int i = 0; i < ir->num_state_slots; i++) {
+      /* This state reference has already been setup by ir_to_mesa, but we'll
+       * get the same index back here.
+       */
+      int index = _mesa_add_state_reference(this->fp->Base.Parameters,
+                                           (gl_state_index *)slots[i].tokens);
 
-        /* Add each of the unique swizzles of the element as a
-         * parameter.  This'll end up matching the expected layout of
-         * the array/matrix/structure we're trying to fill in.
-         */
-        int last_swiz = -1;
-        for (unsigned int j = 0; j < 4; j++) {
-           int swiz = GET_SWZ(slots[i].swizzle, j);
-           if (swiz == last_swiz)
-              break;
-           last_swiz = swiz;
+      /* Add each of the unique swizzles of the element as a parameter.
+       * This'll end up matching the expected layout of the
+       * array/matrix/structure we're trying to fill in.
+       */
+      int last_swiz = -1;
+      for (unsigned int j = 0; j < 4; j++) {
+        int swiz = GET_SWZ(slots[i].swizzle, j);
+        if (swiz == last_swiz)
+           break;
+        last_swiz = swiz;
 
-           c->prog_data.param_convert[c->prog_data.nr_params] =
-              PARAM_NO_CONVERT;
-           this->param_index[c->prog_data.nr_params] = index;
-           this->param_offset[c->prog_data.nr_params] = swiz;
-           c->prog_data.nr_params++;
-        }
+        c->prog_data.param_convert[c->prog_data.nr_params] =
+           PARAM_NO_CONVERT;
+        this->param_index[c->prog_data.nr_params] = index;
+        this->param_offset[c->prog_data.nr_params] = swiz;
+        c->prog_data.nr_params++;
       }
    }
 }
index 4cca2b7..bf2513d 100644 (file)
@@ -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,