r600: Annotate some case fallthroughs
authorGert Wollny <gert.wollny@collabora.com>
Wed, 6 May 2020 16:09:52 +0000 (18:09 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Thu, 7 May 2020 09:00:26 +0000 (11:00 +0200)
Also fix indentions where aproprate

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>

src/gallium/drivers/r600/eg_debug.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_query.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state_common.c

index 56195df296479287afdcd7563dbcaced7a153bd5..996e1ab8eaf234b2af155c52db7fb8356aff2796 100644 (file)
@@ -256,7 +256,7 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
                                        COLOR_RESET "\n");
                        break;
                }
-               /* fall through, print all dwords */
+               /* fallthrough *//* print all dwords */
        default:
                for (i = 0; i < count+1; i++) {
                        print_spaces(f, INDENT_PKT);
index 3ffead9eb29edf56c3cf28b37913a0913d8b03d7..94dc07d3059e5c5703ae8513a72e88166241fc90 100644 (file)
@@ -561,9 +561,11 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,
        case PIPE_SHADER_TESS_EVAL:
                if (rscreen->b.family >= CHIP_CEDAR)
                        break;
+               /* fallthrough */
        case PIPE_SHADER_COMPUTE:
                if (!is_nir_enabled(&rscreen->b))
                        break;
+               /* fallthrough */
        default:
                return 0;
        }
index 4ef7bc8ca1b06a4ab00f89b6423b63b37431c31d..082052a4a7dbc18f370434818a9d0dd4e3a4be23 100644 (file)
@@ -1125,6 +1125,7 @@ static void r600_get_hw_query_params(struct r600_common_context *rctx,
        case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
                params->pair_count = R600_MAX_STREAMS;
                params->pair_stride = 32;
+               /* fallthrough */
        case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
                params->start_offset = 0;
                params->end_offset = 16;
index ed0db0e114abce4779135929a7c21fb37513284e..f2eb7796810d538e97013678117549c81fea1aed 100644 (file)
@@ -500,24 +500,26 @@ static int tgsi_is_supported(struct r600_shader_ctx *ctx)
 #endif
        for (j = 0; j < i->Instruction.NumSrcRegs; j++) {
                if (i->Src[j].Register.Dimension) {
-                  switch (i->Src[j].Register.File) {
-                  case TGSI_FILE_CONSTANT:
-                  case TGSI_FILE_HW_ATOMIC:
-                          break;
-                  case TGSI_FILE_INPUT:
-                          if (ctx->type == PIPE_SHADER_GEOMETRY ||
-                              ctx->type == PIPE_SHADER_TESS_CTRL ||
-                              ctx->type == PIPE_SHADER_TESS_EVAL)
-                                  break;
-                  case TGSI_FILE_OUTPUT:
-                          if (ctx->type == PIPE_SHADER_TESS_CTRL)
-                                  break;
-                  default:
-                          R600_ERR("unsupported src %d (file %d, dimension %d)\n", j,
-                                   i->Src[j].Register.File,
-                                   i->Src[j].Register.Dimension);
-                          return -EINVAL;
-                  }
+                       switch (i->Src[j].Register.File) {
+                       case TGSI_FILE_CONSTANT:
+                       case TGSI_FILE_HW_ATOMIC:
+                               break;
+                       case TGSI_FILE_INPUT:
+                               if (ctx->type == PIPE_SHADER_GEOMETRY ||
+                                   ctx->type == PIPE_SHADER_TESS_CTRL ||
+                                   ctx->type == PIPE_SHADER_TESS_EVAL)
+                                       break;
+                               /* fallthrough */
+                       case TGSI_FILE_OUTPUT:
+                               if (ctx->type == PIPE_SHADER_TESS_CTRL)
+                                       break;
+                               /* fallthrough */
+                       default:
+                               R600_ERR("unsupported src %d (file %d, dimension %d)\n", j,
+                                        i->Src[j].Register.File,
+                                        i->Src[j].Register.Dimension);
+                               return -EINVAL;
+                       }
                }
        }
        for (j = 0; j < i->Instruction.NumDstRegs; j++) {
index 76dd931413220436c37d5a4f2f8e21dc4e38e0f6..5deb905c630b3843188f753a8798d882aad37de1 100644 (file)
@@ -2782,6 +2782,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
                case PIPE_FORMAT_RGTC1_SNORM:
                case PIPE_FORMAT_LATC1_SNORM:
                        word4 |= sign_bit[0];
+                       /* fallthrough */
                case PIPE_FORMAT_RGTC1_UNORM:
                case PIPE_FORMAT_LATC1_UNORM:
                        result = FMT_BC4;
@@ -2789,6 +2790,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
                case PIPE_FORMAT_RGTC2_SNORM:
                case PIPE_FORMAT_LATC2_SNORM:
                        word4 |= sign_bit[0] | sign_bit[1];
+                       /* fallthrough */
                case PIPE_FORMAT_RGTC2_UNORM:
                case PIPE_FORMAT_LATC2_UNORM:
                        result = FMT_BC5;