From 7579414db240e9c46f3d440ae4756b053a1340ea Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 1 Jul 2020 16:35:44 +1000 Subject: [PATCH] r300: add and fix up fallthrough comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/r300/r300_emit.c | 3 +++ src/gallium/drivers/r300/r300_state_derived.c | 2 +- src/gallium/drivers/r300/r300_texture.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index dc33aea95c2..fed3f71e5da 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -686,11 +686,13 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300, OUT_CS_REG(R300_SU_REG_DEST, 1 << 3); OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 3) * 4); OUT_CS_RELOC(r300->query_current); + /* fallthrough */ case 3: /* pipe 2 only */ OUT_CS_REG(R300_SU_REG_DEST, 1 << 2); OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 2) * 4); OUT_CS_RELOC(r300->query_current); + /* fallthrough */ case 2: /* pipe 1 only */ /* As mentioned above, accommodate RV380 and older. */ @@ -698,6 +700,7 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300, 1 << (caps->high_second_pipe ? 3 : 1)); OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 1) * 4); OUT_CS_RELOC(r300->query_current); + /* fallthrough */ case 1: /* pipe 0 only */ OUT_CS_REG(R300_SU_REG_DEST, 1 << 0); diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 848bbd392bc..150fafe88be 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -683,7 +683,7 @@ static uint32_t r300_get_border_color(enum pipe_format format, border_swizzled[0] = border_swizzled[0] < 0 ? border_swizzled[0]*0.5+1 : border_swizzled[0]*0.5; - /* Pass through. */ + /* fallthrough. */ case PIPE_FORMAT_RGTC1_UNORM: case PIPE_FORMAT_LATC1_UNORM: diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index be5818794c6..d175d6caa65 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -274,6 +274,7 @@ uint32_t r300_translate_texformat(enum pipe_format format, case PIPE_FORMAT_RGTC1_SNORM: case PIPE_FORMAT_LATC1_SNORM: result |= sign_bit[0]; + /* fallthrough */ case PIPE_FORMAT_LATC1_UNORM: case PIPE_FORMAT_RGTC1_UNORM: return R500_TX_FORMAT_ATI1N | result; @@ -281,6 +282,7 @@ uint32_t r300_translate_texformat(enum pipe_format format, case PIPE_FORMAT_RGTC2_SNORM: case PIPE_FORMAT_LATC2_SNORM: result |= sign_bit[1] | sign_bit[0]; + /* fallthrough */ case PIPE_FORMAT_RGTC2_UNORM: case PIPE_FORMAT_LATC2_UNORM: return R400_TX_FORMAT_ATI2N | result; -- 2.30.2