Mesa (master): microsoft/compiler: Fix clang fallthrough warnings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 3 23:24:44 UTC 2021
Module: Mesa
Branch: master
Commit: 24dcdc3fa9485463de2d3f9053bc02619656a3e8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=24dcdc3fa9485463de2d3f9053bc02619656a3e8
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Dec 28 12:52:00 2020 -0800
microsoft/compiler: Fix clang fallthrough warnings
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
---
src/microsoft/compiler/dxil_signature.c | 2 +-
src/microsoft/compiler/nir_to_dxil.c | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/microsoft/compiler/dxil_signature.c b/src/microsoft/compiler/dxil_signature.c
index e44b16e8c58..0f042e57bc8 100644
--- a/src/microsoft/compiler/dxil_signature.c
+++ b/src/microsoft/compiler/dxil_signature.c
@@ -237,7 +237,7 @@ get_semantic_name(nir_variable *var, struct semantic_info *info,
case VARYING_SLOT_CLIP_DIST1:
info->index = 1;
- /* fallthrough */
+ FALLTHROUGH;
case VARYING_SLOT_CLIP_DIST0:
assert(var->data.location == VARYING_SLOT_CLIP_DIST1 || info->index == 0);
snprintf(info->name, 64, "%s", "SV_ClipDistance");
diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c
index 229c9085fe6..97334a73329 100644
--- a/src/microsoft/compiler/nir_to_dxil.c
+++ b/src/microsoft/compiler/nir_to_dxil.c
@@ -1340,14 +1340,14 @@ store_dest(struct ntd_context *ctx, nir_dest *dest, unsigned chan,
case nir_type_float:
if (nir_dest_bit_size(*dest) == 64)
ctx->mod.feats.doubles = true;
- /* fallthrough */
+ FALLTHROUGH;
case nir_type_uint:
case nir_type_int:
if (nir_dest_bit_size(*dest) == 16)
ctx->mod.feats.native_low_precision = true;
if (nir_dest_bit_size(*dest) == 64)
ctx->mod.feats.int64_ops = true;
- /* fallthrough */
+ FALLTHROUGH;
case nir_type_bool:
store_dest_value(ctx, dest, chan, value);
break;
@@ -1568,6 +1568,7 @@ get_cast_dest_type(struct ntd_context *ctx, nir_alu_instr *alu)
switch (nir_alu_type_get_base_type(nir_op_infos[alu->op].output_type)) {
case nir_type_bool:
assert(dst_bits == 1);
+ FALLTHROUGH;
case nir_type_int:
case nir_type_uint:
return dxil_module_get_int_type(&ctx->mod, dst_bits);
@@ -3550,7 +3551,7 @@ emit_tex(struct ntd_context *ctx, nir_tex_instr *instr)
break;
}
params.lod_or_sample = dxil_module_get_float_const(&ctx->mod, 0);
- /* fallthrough */
+ FALLTHROUGH;
case nir_texop_txl:
sample = emit_sample_level(ctx, ¶ms);
break;
@@ -4378,7 +4379,7 @@ nir_var_to_dxil_sysvalue_type(nir_variable *var, uint64_t other_stage_mask)
case VARYING_SLOT_PSIZ:
if (!((1 << var->data.location) & other_stage_mask))
return DXIL_SYSVALUE;
- /* fallthrough */
+ FALLTHROUGH;
default:
return DXIL_NO_SYSVALUE;
}
More information about the mesa-commit
mailing list