nir/spirv: Fix warning and add missing breaks.
authorDaniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Tue, 10 Apr 2018 10:02:44 +0000 (12:02 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 13 Apr 2018 22:52:22 +0000 (00:52 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_subgroup.c

index 78c1e9ff5979b8dfe5d6ad7c9db2bbb7db7f8f8e..28274311c2b40e1e7aa8628241d1ade1238a3ddc 100644 (file)
@@ -3361,10 +3361,12 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
 
       case SpvCapabilityGroupNonUniformQuad:
          spv_check_supported(subgroup_quad, cap);
+         break;
 
       case SpvCapabilityGroupNonUniformArithmetic:
       case SpvCapabilityGroupNonUniformClustered:
          spv_check_supported(subgroup_arithmetic, cap);
+         break;
 
       case SpvCapabilityVariablePointersStorageBuffer:
       case SpvCapabilityVariablePointers:
index bd3143962be83eaa43d3767061c4a5fff2970ea1..ecec3aa62d0ea1f389c22d3d810d21e202b77583 100644 (file)
@@ -277,6 +277,8 @@ vtn_handle_subgroup(struct vtn_builder *b, SpvOp opcode,
       case 2:
          op = nir_intrinsic_quad_swap_diagonal;
          break;
+      default:
+         vtn_fail("Invalid constant value in OpGroupNonUniformQuadSwap");
       }
       vtn_build_subgroup_instr(b, op, val->ssa, vtn_ssa_value(b, w[4]),
                                NULL, 0, 0);