i915g: fix implicit fallthrough

Closes: #4777
Fixes: 4e861ac4a1 ("i915g: Add more optimizations")
Fixes: f34fd58ec9 ("i915g: implement unfenced relocs for textures using tiling bits")
Fixes: beaf039f97 ("i915g: cleanup static state calculation, part 1")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10811>
(cherry picked from commit 3e74bbf631)
This commit is contained in:
Abel García Dorta 2021-05-14 22:41:50 +01:00 committed by Eric Engestrom
parent 54bea47de9
commit ce8b08b7e3
4 changed files with 11 additions and 1 deletions

View file

@ -130,7 +130,7 @@
"description": "i915g: fix implicit fallthrough",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "4e861ac4a1f1bdbd28f66e3f15eb45aa45a47bad"
},

View file

@ -146,10 +146,13 @@ static unsigned mask_for_unswizzled(int num_components)
{
case 4:
mask |= TGSI_WRITEMASK_W;
FALLTHROUGH;
case 3:
mask |= TGSI_WRITEMASK_Z;
FALLTHROUGH;
case 2:
mask |= TGSI_WRITEMASK_Y;
FALLTHROUGH;
case 1:
mask |= TGSI_WRITEMASK_X;
}
@ -340,12 +343,15 @@ static void liveness_analysis(struct i915_optimize_context *ctx,
case 3:
src_reg = &current->FullInstruction.Src[2];
liveness_mark_read(ctx, src_reg, i);
FALLTHROUGH;
case 2:
src_reg = &current->FullInstruction.Src[1];
liveness_mark_read(ctx, src_reg, i);
FALLTHROUGH;
case 1:
src_reg = &current->FullInstruction.Src[0];
liveness_mark_read(ctx, src_reg, i);
FALLTHROUGH;
case 0:
break;
default:

View file

@ -286,8 +286,10 @@ ms3_tiling_bits(enum i915_winsys_buffer_tile tiling)
switch (tiling) {
case I915_TILE_Y:
tiling_bits |= MS3_TILE_WALK_Y;
FALLTHROUGH;
case I915_TILE_X:
tiling_bits |= MS3_TILED_SURFACE;
FALLTHROUGH;
case I915_TILE_NONE:
break;
}

View file

@ -83,8 +83,10 @@ buf_3d_tiling_bits(enum i915_winsys_buffer_tile tiling)
switch (tiling) {
case I915_TILE_Y:
tiling_bits |= BUF_3D_TILE_WALK_Y;
FALLTHROUGH;
case I915_TILE_X:
tiling_bits |= BUF_3D_TILED_SURFACE;
FALLTHROUGH;
case I915_TILE_NONE:
break;
}