Mesa (master): etnaviv: add missing fallthrough comments

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 10 01:01:19 UTC 2020


Module: Mesa
Branch: master
Commit: 745aeba623663579d3ba1a394a02baea0689e657
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=745aeba623663579d3ba1a394a02baea0689e657

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Wed Jul  8 19:31:21 2020 +1000

etnaviv: add missing fallthrough comments

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>

---

 src/gallium/drivers/etnaviv/etnaviv_clear_blit.c   | 3 +++
 src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c | 1 +
 src/gallium/drivers/etnaviv/etnaviv_compiler_nir.h | 1 +
 src/gallium/drivers/etnaviv/etnaviv_format.c       | 1 +
 4 files changed, 6 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
index b878dc976ab..3ccfc6747b3 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
@@ -78,10 +78,13 @@ etna_clear_blit_pack_rgba(enum pipe_format format, const union pipe_color_union
    switch (util_format_get_blocksize(format)) {
    case 1:
       uc.ui[0] = uc.ui[0] << 8 | (uc.ui[0] & 0xff);
+      /* fallthrough */
    case 2:
       uc.ui[0] =  uc.ui[0] << 16 | (uc.ui[0] & 0xffff);
+      /* fallthrough */
    case 4:
       uc.ui[1] = uc.ui[0];
+      /* fallthrough */
    default:
       return (uint64_t) uc.ui[1] << 32 | uc.ui[0];
    }
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
index 63b5152a4a6..44e6c5ec9d5 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
@@ -852,6 +852,7 @@ lower_alu(struct etna_compile *c, nir_alu_instr *alu)
             need_mov = vec_dest_has_swizzle(alu, &nir_instr_as_intrinsic(instr)->dest.ssa);
             break;
          }
+         /* fallthrough */
       default:
          need_mov = true;
       }
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.h b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.h
index 4808767b640..7a2bbdf70a1 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.h
@@ -145,6 +145,7 @@ real_dest(nir_dest *dest, unsigned *swiz, unsigned *mask)
              nir_instr_as_alu(p_instr)->op == nir_op_mov) {
             break;
          }
+         /* fallthrough */
       default:
          can_bypass_src = false;
          break;
diff --git a/src/gallium/drivers/etnaviv/etnaviv_format.c b/src/gallium/drivers/etnaviv/etnaviv_format.c
index 97df90e065d..598e61b5d5d 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_format.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_format.c
@@ -277,6 +277,7 @@ texture_use_int_filter(const struct pipe_sampler_view *sv,
    case PIPE_TEXTURE_2D_ARRAY:
       if (tex_desc)
          break;
+      /* fallthrough */
    case PIPE_TEXTURE_3D:
       return false;
    default:



More information about the mesa-commit mailing list