Mesa (master): i965: add and fix fallthrough comments

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 2 04:11:19 UTC 2020


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Wed Jul  1 15:18:02 2020 +1000

i965: add and fix fallthrough comments

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>

---

 src/mesa/drivers/dri/i965/brw_draw.c          | 2 +-
 src/mesa/drivers/dri/i965/brw_meta_util.c     | 2 +-
 src/mesa/drivers/dri/i965/brw_wm.c            | 2 +-
 src/mesa/drivers/dri/i965/genX_state_upload.c | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 815dc2bc969..cf4778e8abc 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -312,7 +312,7 @@ static uint8_t get_wa_flags(const struct gl_vertex_format *glformat)
 
    case GL_INT_2_10_10_10_REV:
       wa_flags |= BRW_ATTRIB_WA_SIGN;
-      /* fallthough */
+      /* fallthrough */
 
    case GL_UNSIGNED_INT_2_10_10_10_REV:
       if (glformat->Format == GL_BGRA)
diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c b/src/mesa/drivers/dri/i965/brw_meta_util.c
index 268b3192de0..c8f9b387281 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_util.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_util.c
@@ -348,7 +348,7 @@ brw_meta_convert_fast_clear_color(const struct brw_context *brw,
    switch (_mesa_get_format_base_format(mt->format)) {
    case GL_INTENSITY:
       override_color.u32[3] = override_color.u32[0];
-      /* flow through */
+      /* fallthrough */
    case GL_LUMINANCE:
    case GL_LUMINANCE_ALPHA:
       override_color.u32[1] = override_color.u32[0];
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 24a23c1bc8e..3bee666cec8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -253,8 +253,8 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
                      key->swizzles[i] |= SWIZZLE_ONE << (3 * i);
                   }
                }
-               /* fallthrough */
             }
+            /* fallthrough */
             case GL_RG32F:
                /* The channel select for green doesn't work - we have to
                 * request blue.  Haswell can use SCS for this, but Ivybridge
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index be64313d8a1..153e2532d41 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -671,9 +671,9 @@ genX(emit_vertices)(struct brw_context *brw)
             upload_format_size(upload_format) : glformat->Size;
 
          switch (size) {
-            case 0: comp0 = VFCOMP_STORE_0;
-            case 1: comp1 = VFCOMP_STORE_0;
-            case 2: comp2 = VFCOMP_STORE_0;
+            case 0: comp0 = VFCOMP_STORE_0; /* fallthrough */
+            case 1: comp1 = VFCOMP_STORE_0; /* fallthrough */
+            case 2: comp2 = VFCOMP_STORE_0; /* fallthrough */
             case 3:
                if (GEN_GEN >= 8 && glformat->Doubles) {
                   comp3 = VFCOMP_STORE_0;



More information about the mesa-commit mailing list