st/mesa: remove pre C99 statement block for variable declaration
authorTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 30 Jan 2017 23:20:41 +0000 (10:20 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 1 Feb 2017 21:31:28 +0000 (08:31 +1100)
Acked-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_program.c

index 94204d7bd32dfbceaf626f6fe7e6e84dd7dc8078..b2d15863b1989774792cad9aded6682947b30ec6 100644 (file)
@@ -757,72 +757,70 @@ st_translate_fragment_program(struct st_context *st,
    /*
     * Semantics and mapping for outputs
     */
-   {
-      GLbitfield64 outputsWritten = stfp->Base.info.outputs_written;
-
-      /* if z is written, emit that first */
-      if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
-         fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_POSITION;
-         fs_output_semantic_index[fs_num_outputs] = 0;
-         outputMapping[FRAG_RESULT_DEPTH] = fs_num_outputs;
-         fs_num_outputs++;
-         outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
-      }
+   GLbitfield64 outputsWritten = stfp->Base.info.outputs_written;
+
+   /* if z is written, emit that first */
+   if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
+      fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_POSITION;
+      fs_output_semantic_index[fs_num_outputs] = 0;
+      outputMapping[FRAG_RESULT_DEPTH] = fs_num_outputs;
+      fs_num_outputs++;
+      outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
+   }
 
-      if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
-         fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
-         fs_output_semantic_index[fs_num_outputs] = 0;
-         outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
-         fs_num_outputs++;
-         outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
-      }
+   if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
+      fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
+      fs_output_semantic_index[fs_num_outputs] = 0;
+      outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
+      fs_num_outputs++;
+      outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
+   }
 
-      if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)) {
-         fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_SAMPLEMASK;
-         fs_output_semantic_index[fs_num_outputs] = 0;
-         outputMapping[FRAG_RESULT_SAMPLE_MASK] = fs_num_outputs;
-         fs_num_outputs++;
-         outputsWritten &= ~(1 << FRAG_RESULT_SAMPLE_MASK);
-      }
+   if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)) {
+      fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_SAMPLEMASK;
+      fs_output_semantic_index[fs_num_outputs] = 0;
+      outputMapping[FRAG_RESULT_SAMPLE_MASK] = fs_num_outputs;
+      fs_num_outputs++;
+      outputsWritten &= ~(1 << FRAG_RESULT_SAMPLE_MASK);
+   }
 
-      /* handle remaining outputs (color) */
-      for (attr = 0; attr < ARRAY_SIZE(outputMapping); attr++) {
-         const GLbitfield64 written = attr < FRAG_RESULT_MAX ? outputsWritten :
-            stfp->Base.SecondaryOutputsWritten;
-         const unsigned loc = attr % FRAG_RESULT_MAX;
-
-         if (written & BITFIELD64_BIT(loc)) {
-            switch (loc) {
-            case FRAG_RESULT_DEPTH:
-            case FRAG_RESULT_STENCIL:
-            case FRAG_RESULT_SAMPLE_MASK:
-               /* handled above */
-               assert(0);
-               break;
-            case FRAG_RESULT_COLOR:
-               write_all = GL_TRUE; /* fallthrough */
-            default: {
-               int index;
-               assert(loc == FRAG_RESULT_COLOR ||
-                      (FRAG_RESULT_DATA0 <= loc && loc < FRAG_RESULT_MAX));
-
-               index = (loc == FRAG_RESULT_COLOR) ? 0 : (loc - FRAG_RESULT_DATA0);
-
-               if (attr >= FRAG_RESULT_MAX) {
-                  /* Secondary color for dual source blending. */
-                  assert(index == 0);
-                  index++;
-               }
-
-               fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
-               fs_output_semantic_index[fs_num_outputs] = index;
-               outputMapping[attr] = fs_num_outputs;
-               break;
-            }
+   /* handle remaining outputs (color) */
+   for (attr = 0; attr < ARRAY_SIZE(outputMapping); attr++) {
+      const GLbitfield64 written = attr < FRAG_RESULT_MAX ? outputsWritten :
+         stfp->Base.SecondaryOutputsWritten;
+      const unsigned loc = attr % FRAG_RESULT_MAX;
+
+      if (written & BITFIELD64_BIT(loc)) {
+         switch (loc) {
+         case FRAG_RESULT_DEPTH:
+         case FRAG_RESULT_STENCIL:
+         case FRAG_RESULT_SAMPLE_MASK:
+            /* handled above */
+            assert(0);
+            break;
+         case FRAG_RESULT_COLOR:
+            write_all = GL_TRUE; /* fallthrough */
+         default: {
+            int index;
+            assert(loc == FRAG_RESULT_COLOR ||
+                   (FRAG_RESULT_DATA0 <= loc && loc < FRAG_RESULT_MAX));
+
+            index = (loc == FRAG_RESULT_COLOR) ? 0 : (loc - FRAG_RESULT_DATA0);
+
+            if (attr >= FRAG_RESULT_MAX) {
+               /* Secondary color for dual source blending. */
+               assert(index == 0);
+               index++;
             }
 
-            fs_num_outputs++;
+            fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
+            fs_output_semantic_index[fs_num_outputs] = index;
+            outputMapping[attr] = fs_num_outputs;
+            break;
+         }
          }
+
+         fs_num_outputs++;
       }
    }