nir/spirv: Use breaks instead of returns in constant handling
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 1 Jun 2016 17:34:04 +0000 (10:34 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 4 Jun 2016 02:29:28 +0000 (19:29 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/compiler/spirv/spirv_to_nir.c

index 4061b8a20141fdc326171a5ecb63d46b0e557214..bb7aba4d9d45780a8da05a599f0360b191537b9e 100644 (file)
@@ -1028,7 +1028,7 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
                val->constant->value.u[i] = u[comp];
             }
          }
-         return;
+         break;
       }
 
       case SpvOpCompositeExtract:
@@ -1105,7 +1105,7 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
                   (*c)->value.u[elem + i] = insert->constant->value.u[i];
             }
          }
-         return;
+         break;
       }
 
       default: {
@@ -1134,9 +1134,10 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
          for (unsigned k = 0; k < num_components; k++)
             val->constant->value.u[k] = res.u32[k];
 
-         return;
+         break;
       } /* default */
       }
+      break;
    }
 
    case SpvOpConstantNull: