diff options
author | Gert Wollny <[email protected]> | 2020-05-06 18:09:52 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2020-05-07 11:00:26 +0200 |
commit | 9a244778f7304d47e40a10415e06607835f18a63 (patch) | |
tree | 7357b27d9fb2374e18ca859d228ae6fc0c3a5093 /src | |
parent | f9dbca8db5e2dc857410f1ab34f85ca6dc837413 (diff) |
r600: Annotate some case fallthroughs
Also fix indentions where aproprate
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/eg_debug.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_query.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 38 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 2 |
5 files changed, 26 insertions, 19 deletions
diff --git a/src/gallium/drivers/r600/eg_debug.c b/src/gallium/drivers/r600/eg_debug.c index 56195df2964..996e1ab8eaf 100644 --- a/src/gallium/drivers/r600/eg_debug.c +++ b/src/gallium/drivers/r600/eg_debug.c @@ -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); diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 3ffead9eb29..94dc07d3059 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -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; } diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index 4ef7bc8ca1b..082052a4a7d 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -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; diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index ed0db0e114a..f2eb7796810 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -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++) { diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 76dd9314132..5deb905c630 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -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; |