diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp index cef1dce7bb2..c4b8120ed16 100644 --- a/src/amd/compiler/aco_lower_to_hw_instr.cpp +++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp @@ -701,7 +701,7 @@ void emit_reduction(lower_context *ctx, aco_opcode op, ReduceOp reduce_op, unsig bld.writelane(Definition(PhysReg{tmp+i}, v1), identity[i], Operand(0u), Operand(PhysReg{tmp+i}, v1)); } } - /* fall through */ + FALLTHROUGH; case aco_opcode::p_inclusive_scan: assert(cluster_size == ctx->program->wave_size); if (ctx->program->chip_class <= GFX7) { diff --git a/src/amd/vulkan/radv_nir_lower_ycbcr_textures.c b/src/amd/vulkan/radv_nir_lower_ycbcr_textures.c index a42852faac8..96759efcc2d 100644 --- a/src/amd/vulkan/radv_nir_lower_ycbcr_textures.c +++ b/src/amd/vulkan/radv_nir_lower_ycbcr_textures.c @@ -114,7 +114,7 @@ create_plane_tex_instr_implicit(struct ycbcr_state *state, uint32_t plane) nir_src_for_ssa(implicit_downsampled_coords(state, old_tex->src[i].src.ssa)); break; } - /* fall through */ + FALLTHROUGH; default: nir_src_copy(&tex->src[i].src, &old_tex->src[i].src, tex); break; diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 59e9fee3118..b7792d1af42 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -1084,7 +1084,7 @@ radv_emit_stream_output(struct radv_shader_context *ctx, LLVMValueRef const *so_ case 2: /* as v2i32 */ case 3: /* as v4i32 (aligned to 4) */ out[3] = LLVMGetUndef(ctx->ac.i32); - /* fall through */ + FALLTHROUGH; case 4: /* as v4i32 */ vdata = ac_build_gather_values(&ctx->ac, out, !ac_has_vec3_support(ctx->ac.chip_class, false) diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c index d1f0cd6cbc6..245bdfb8484 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c @@ -48,7 +48,7 @@ radv_amdgpu_surface_sanity(const struct ac_surf_info *surf_info, const struct ra case RADEON_SURF_TYPE_1D: if (surf_info->height > 1) return -EINVAL; - /* fall through */ + FALLTHROUGH; case RADEON_SURF_TYPE_2D: case RADEON_SURF_TYPE_CUBEMAP: if (surf_info->depth > 1 || surf_info->array_size > 1) @@ -61,7 +61,7 @@ radv_amdgpu_surface_sanity(const struct ac_surf_info *surf_info, const struct ra case RADEON_SURF_TYPE_1D_ARRAY: if (surf_info->height > 1) return -EINVAL; - /* fall through */ + FALLTHROUGH; case RADEON_SURF_TYPE_2D_ARRAY: if (surf_info->depth > 1) return -EINVAL; diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 6d85dd4374f..2d335549122 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -2448,7 +2448,7 @@ get_type_name_for_precision_qualifier(const glsl_type *type) case GLSL_TYPE_ATOMIC_UINT: return "atomic_uint"; case GLSL_TYPE_IMAGE: - /* fallthrough */ + FALLTHROUGH; case GLSL_TYPE_SAMPLER: { const unsigned type_idx = type->sampler_array + 2 * type->sampler_shadow; @@ -4183,7 +4183,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, case GLSL_TYPE_IMAGE: if (state->has_bindless()) break; - /* fallthrough */ + FALLTHROUGH; default: _mesa_glsl_error(loc, state, "illegal type for a varying variable"); break; diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index 72ae3996110..8be36eda5bd 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1482,7 +1482,7 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type, case MESA_SHADER_TESS_EVAL: case MESA_SHADER_GEOMETRY: this->per_vertex_in.add_field(slot, type, precision, name, interp); - /* FALLTHROUGH */ + FALLTHROUGH; case MESA_SHADER_VERTEX: this->per_vertex_out.add_field(slot, type, precision, name, interp); break; diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 7daf65bef6d..0cabd73be49 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -475,7 +475,7 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version, case API_OPENGLES: assert(!"Should not get here."); - /* FALLTHROUGH */ + FALLTHROUGH; case API_OPENGLES2: this->language_version = 100; diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 8e2e4a0ed1e..c3a5bba80c3 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -1543,7 +1543,7 @@ nir_visitor::visit(ir_call *ir) } case nir_intrinsic_vote_ieq: instr->num_components = 1; - /* fall-through */ + FALLTHROUGH; case nir_intrinsic_vote_any: case nir_intrinsic_vote_all: { nir_ssa_dest_init(&instr->instr, &instr->dest, 1, 1, NULL); diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 924edf7b74f..4cc1da0bf27 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -3864,7 +3864,7 @@ add_shader_variable(const struct gl_context *ctx, } return true; } - /* fallthrough */ + FALLTHROUGH; } default: { diff --git a/src/compiler/glsl/lower_if_to_cond_assign.cpp b/src/compiler/glsl/lower_if_to_cond_assign.cpp index ed7fa4d93c5..06522dc7c6a 100644 --- a/src/compiler/glsl/lower_if_to_cond_assign.cpp +++ b/src/compiler/glsl/lower_if_to_cond_assign.cpp @@ -158,7 +158,7 @@ check_ir_node(ir_instruction *ir, void *data) if (deref->array_index->ir_type != ir_type_constant) v->found_dynamic_arrayref = true; - } /* fall-through */ + } FALLTHROUGH; case ir_type_expression: case ir_type_dereference_record: if (v->is_then) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 28011c9e7f0..cfeea9e8914 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2848,7 +2848,7 @@ glsl_type::count_dword_slots(bool is_bindless) const case GLSL_TYPE_SAMPLER: if (!is_bindless) return 0; - /* FALLTHROUGH */ + FALLTHROUGH; case GLSL_TYPE_DOUBLE: case GLSL_TYPE_UINT64: case GLSL_TYPE_INT64: diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index 0b014411ce9..1bdf6652ee2 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -321,8 +321,7 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader, case nir_intrinsic_demote: case nir_intrinsic_demote_if: shader->info.fs.uses_demote = true; - FALLTHROUGH; - /* fallthrough - quads with helper lanes only might be discarded entirely */ + FALLTHROUGH; /* quads with helper lanes only might be discarded entirely */ case nir_intrinsic_discard: case nir_intrinsic_discard_if: /* Freedreno uses the discard_if intrinsic to end GS invocations that diff --git a/src/compiler/nir/nir_lower_int64.c b/src/compiler/nir/nir_lower_int64.c index 43f7a8b27a7..7900431ce2d 100644 --- a/src/compiler/nir/nir_lower_int64.c +++ b/src/compiler/nir/nir_lower_int64.c @@ -1054,7 +1054,7 @@ should_lower_int64_alu_instr(const nir_alu_instr *alu, break; case nir_op_f2u64: case nir_op_f2i64: - /* fall-through */ + FALLTHROUGH; default: assert(alu->dest.dest.is_ssa); if (alu->dest.dest.ssa.bit_size != 64) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index b261a3e081e..cf13aedc4a7 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2301,7 +2301,7 @@ vtn_mem_semantics_to_nir_mem_semantics(struct vtn_builder *b, break; case SpvMemorySemanticsSequentiallyConsistentMask: - /* Fall through. Treated as AcquireRelease in Vulkan. */ + FALLTHROUGH; /* Treated as AcquireRelease in Vulkan. */ case SpvMemorySemanticsAcquireReleaseMask: nir_semantics = NIR_MEMORY_ACQUIRE | NIR_MEMORY_RELEASE; break; diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index 2bae8090eb9..1fb3166dc91 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -1120,7 +1120,7 @@ droid_get_buffers_parse_attachments(struct dri2_egl_surface *dri2_surf, break; } - /* fall through for pbuffers */ + FALLTHROUGH; /* for pbuffers */ case __DRI_BUFFER_DEPTH: case __DRI_BUFFER_STENCIL: case __DRI_BUFFER_ACCUM: diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index 477c24b6ab2..804acc761b5 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -137,7 +137,7 @@ should_double_threadsize(struct ir3_shader_variant *v, return false; } } - /* fallthrough */ + FALLTHROUGH; case MESA_SHADER_FRAGMENT: { /* Check that doubling the threadsize wouldn't exceed the regfile size */ return regs_count * 2 <= compiler->reg_size_vec4; diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 5d9bbe8a251..b6a5e91e31f 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1883,7 +1883,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) break; case nir_intrinsic_load_sample_id: ctx->so->per_samp = true; - /* fall-thru */ + FALLTHROUGH; case nir_intrinsic_load_sample_id_no_per_sample: if (!ctx->samp_id) { ctx->samp_id = create_sysval_input(ctx, SYSTEM_VALUE_SAMPLE_ID, 0x1); @@ -2337,7 +2337,7 @@ emit_tex(struct ir3_context *ctx, nir_tex_instr *tex) ctx->so->num_sampler_prefetch++; break; } - /* fallthru */ + FALLTHROUGH; case nir_texop_tex: opc = has_lod ? OPC_SAML : OPC_SAM; break; case nir_texop_txb: opc = OPC_SAMB; break; case nir_texop_txl: opc = OPC_SAML; break; @@ -3267,7 +3267,7 @@ setup_output(struct ir3_context *ctx, nir_intrinsic_instr *intr) case VARYING_SLOT_PRIMITIVE_ID: case VARYING_SLOT_GS_VERTEX_FLAGS_IR3: debug_assert(ctx->so->type == MESA_SHADER_GEOMETRY); - /* fall through */ + FALLTHROUGH; case VARYING_SLOT_COL0: case VARYING_SLOT_COL1: case VARYING_SLOT_BFC0: diff --git a/src/freedreno/rnn/rnndec.c b/src/freedreno/rnn/rnndec.c index 28cead6558d..e2a738db817 100644 --- a/src/freedreno/rnn/rnndec.c +++ b/src/freedreno/rnn/rnndec.c @@ -30,6 +30,7 @@ #include #include #include "util.h" +#include "util/compiler.h" struct rnndeccontext *rnndec_newcontext(struct rnndb *db) { struct rnndeccontext *res = calloc (sizeof *res, 1); @@ -266,7 +267,7 @@ char *rnndec_decodeval(struct rnndeccontext *ctx, struct rnntypeinfo *ti, uint64 ctx->colors->reset); break; } - /* fallthrough */ + FALLTHROUGH; case RNN_TTYPE_UFIXED: asprintf (&res, "%s%lf%s", ctx->colors->num, ((double)value) / ((double)(1LL << ti->radix)), diff --git a/src/freedreno/vulkan/tu_clear_blit.c b/src/freedreno/vulkan/tu_clear_blit.c index 57e812433c0..fb97f36d65a 100644 --- a/src/freedreno/vulkan/tu_clear_blit.c +++ b/src/freedreno/vulkan/tu_clear_blit.c @@ -956,13 +956,13 @@ copy_format(VkFormat format, VkImageAspectFlags aspect_mask, bool copy_buffer) case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: if (aspect_mask == VK_IMAGE_ASPECT_PLANE_1_BIT) return VK_FORMAT_R8G8_UNORM; - /* fallthrough */ + FALLTHROUGH; case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: return VK_FORMAT_R8_UNORM; case VK_FORMAT_D24_UNORM_S8_UINT: if (aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT && copy_buffer) return VK_FORMAT_R8_UNORM; - /* fallthrough */ + FALLTHROUGH; default: return format; case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32: diff --git a/src/freedreno/vulkan/tu_descriptor_set.c b/src/freedreno/vulkan/tu_descriptor_set.c index 5930ee9988b..34d9733a838 100644 --- a/src/freedreno/vulkan/tu_descriptor_set.c +++ b/src/freedreno/vulkan/tu_descriptor_set.c @@ -1008,7 +1008,7 @@ tu_CreateDescriptorUpdateTemplate( immutable_samplers = tu_immutable_samplers(set_layout, binding_layout) + entry->dstArrayElement; } - /* fallthrough */ + FALLTHROUGH; default: dst_offset = binding_layout->offset / 4; dst_offset += (binding_layout->size * entry->dstArrayElement) / 4; diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index c98df7cada8..1de7f90dc62 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -688,7 +688,7 @@ tu_CreateImage(VkDevice _device, switch (layout->nr_samples) { case 4: width *= 2; - /* fallthru */ + FALLTHROUGH; case 2: height *= 2; break; diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index fee9c16401d..ee8e53ec536 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -174,7 +174,7 @@ tu6_emit_load_state(struct tu_pipeline *pipeline, bool compute) base = MAX_SETS; offset = (layout->set[i].dynamic_offset_start + binding->dynamic_offset_offset) * A6XX_TEX_CONST_DWORDS; - /* fallthrough */ + FALLTHROUGH; case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: @@ -206,7 +206,7 @@ tu6_emit_load_state(struct tu_pipeline *pipeline, bool compute) base = MAX_SETS; offset = (layout->set[i].dynamic_offset_start + binding->dynamic_offset_offset) * A6XX_TEX_CONST_DWORDS; - /* fallthrough */ + FALLTHROUGH; case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: { tu_foreach_stage(stage, stages) { emit_load_state(&cs, tu6_stage2opcode(stage), ST6_UBO, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 5dba90b28ae..6af22d0c378 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -2209,7 +2209,7 @@ lp_build_sample_common(struct lp_build_sample_context *bld, switch (mip_filter) { default: assert(0 && "bad mip_filter value in lp_build_sample_soa()"); - /* fall-through */ + FALLTHROUGH; case PIPE_TEX_MIPFILTER_NONE: /* always use mip level 0 */ first_level = bld->dynamic_state->first_level(bld->dynamic_state, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c index b648e681994..875271883e1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c @@ -33,6 +33,7 @@ */ #include /* for PRIx64 macro */ +#include "util/compiler.h" #include "util/u_debug.h" #include "lp_bld_type.h" @@ -407,7 +408,7 @@ lp_build_swizzle_aos(struct lp_build_context *bld, switch (swizzles[i]) { default: assert(0); - /* fall through */ + FALLTHROUGH; case PIPE_SWIZZLE_X: case PIPE_SWIZZLE_Y: case PIPE_SWIZZLE_Z: diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp index 76e50b046b0..ac93ed33a5d 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp @@ -177,7 +177,7 @@ init_texture(struct d3d12_screen *screen, case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: desc.DepthOrArraySize *= 6; - /* fall-through */ + FALLTHROUGH; case PIPE_TEXTURE_2D: case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_RECT: diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index ea8a26c19c1..7b7a5ed254c 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -300,7 +300,7 @@ main(int argc, char **argv) break; default: printf("unrecognized arg: %c\n", opt); - /* fallthrough */ + FALLTHROUGH; case 'h': print_usage(); return 0; diff --git a/src/gallium/drivers/i915/i915_fpc_emit.c b/src/gallium/drivers/i915/i915_fpc_emit.c index a4b5ae675a3..5dff7b07e4a 100644 --- a/src/gallium/drivers/i915/i915_fpc_emit.c +++ b/src/gallium/drivers/i915/i915_fpc_emit.c @@ -201,13 +201,13 @@ uint i915_emit_texld( struct i915_fp_compile *p, switch(num_coord) { case 0: ignore |= (0xf << UREG_CHANNEL_X_SHIFT); - /* fall-through */ + FALLTHROUGH; case 1: ignore |= (0xf << UREG_CHANNEL_Y_SHIFT); - /* fall-through */ + FALLTHROUGH; case 2: ignore |= (0xf << UREG_CHANNEL_Z_SHIFT); - /* fall-through */ + FALLTHROUGH; case 3: ignore |= (0xf << UREG_CHANNEL_W_SHIFT); } diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 28c12324195..34f29935cd1 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -237,7 +237,7 @@ src_vector(struct i915_fp_compile *p, case TGSI_FILE_IMMEDIATE: assert(index < p->num_immediates); index = p->immediates_map[index]; - /* fall-through */ + FALLTHROUGH; case TGSI_FILE_CONSTANT: src = UREG(REG_TYPE_CONST, index); break; @@ -338,17 +338,17 @@ translate_tex_src_target(struct i915_fp_compile *p, uint tex) { switch (tex) { case TGSI_TEXTURE_SHADOW1D: - /* fall-through */ + FALLTHROUGH; case TGSI_TEXTURE_1D: return D0_SAMPLE_TYPE_2D; case TGSI_TEXTURE_SHADOW2D: - /* fall-through */ + FALLTHROUGH; case TGSI_TEXTURE_2D: return D0_SAMPLE_TYPE_2D; case TGSI_TEXTURE_SHADOWRECT: - /* fall-through */ + FALLTHROUGH; case TGSI_TEXTURE_RECT: return D0_SAMPLE_TYPE_2D; diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index b24cad39940..30dd80123d6 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -312,12 +312,12 @@ i915_get_paramf(struct pipe_screen *screen, enum pipe_capf cap) { switch(cap) { case PIPE_CAPF_MAX_LINE_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_LINE_WIDTH_AA: return 7.5; case PIPE_CAPF_MAX_POINT_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_POINT_WIDTH_AA: return 255.0; @@ -328,9 +328,9 @@ i915_get_paramf(struct pipe_screen *screen, enum pipe_capf cap) return 16.0; case PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY: return 0.0f; diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index eaae971c79a..80ce6000bc9 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -999,7 +999,7 @@ iris_resource_render_aux_usage(struct iris_context *ice, render_format)) { return res->aux.usage; } - /* fallthrough */ + FALLTHROUGH; default: return ISL_AUX_USAGE_NONE; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 5f882390c4b..2f2b2a10a53 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3584,9 +3584,9 @@ iris_create_vertex_elements(struct pipe_context *ctx, VFCOMP_STORE_SRC, VFCOMP_STORE_SRC }; switch (isl_format_get_num_channels(fmt.fmt)) { - case 0: comp[0] = VFCOMP_STORE_0; /* fallthrough */ - case 1: comp[1] = VFCOMP_STORE_0; /* fallthrough */ - case 2: comp[2] = VFCOMP_STORE_0; /* fallthrough */ + case 0: comp[0] = VFCOMP_STORE_0; FALLTHROUGH; + case 1: comp[1] = VFCOMP_STORE_0; FALLTHROUGH; + case 2: comp[2] = VFCOMP_STORE_0; FALLTHROUGH; case 3: comp[3] = isl_format_has_int_channel(fmt.fmt) ? VFCOMP_STORE_1_INT : VFCOMP_STORE_1_FP; diff --git a/src/gallium/drivers/lima/ir/gp/codegen.c b/src/gallium/drivers/lima/ir/gp/codegen.c index 63254cc7904..d9a46f86a90 100644 --- a/src/gallium/drivers/lima/ir/gp/codegen.c +++ b/src/gallium/drivers/lima/ir/gp/codegen.c @@ -114,7 +114,7 @@ static void gpir_codegen_mul0_slot(gpir_codegen_instr *code, gpir_instr *instr) case gpir_op_neg: code->mul0_neg = true; - /* fallthrough */ + FALLTHROUGH; case gpir_op_mov: code->mul0_src0 = gpir_get_alu_input(node, alu->children[0]); code->mul0_src1 = gpir_codegen_src_ident; @@ -174,7 +174,7 @@ static void gpir_codegen_mul1_slot(gpir_codegen_instr *code, gpir_instr *instr) case gpir_op_neg: code->mul1_neg = true; - /* fallthrough */ + FALLTHROUGH; case gpir_op_mov: code->mul1_src0 = gpir_get_alu_input(node, alu->children[0]); code->mul1_src1 = gpir_codegen_src_ident; @@ -267,7 +267,7 @@ static void gpir_codegen_add0_slot(gpir_codegen_instr *code, gpir_instr *instr) case gpir_op_neg: code->acc0_src0_neg = true; - /* fallthrough */ + FALLTHROUGH; case gpir_op_mov: code->acc_op = gpir_codegen_acc_op_add; code->acc0_src0 = gpir_get_alu_input(node, alu->children[0]); @@ -352,7 +352,7 @@ static void gpir_codegen_add1_slot(gpir_codegen_instr *code, gpir_instr *instr) case gpir_op_neg: code->acc1_src0_neg = true; - /* fallthrough */ + FALLTHROUGH; case gpir_op_mov: code->acc_op = gpir_codegen_acc_op_add; code->acc1_src0 = gpir_get_alu_input(node, alu->children[0]); diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c index 2d3cde38c97..96bf8d4ea59 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c @@ -324,7 +324,7 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld, index = lp_build_const_int32(gallivm, chan); switch (interp) { case LP_INTERP_PERSPECTIVE: - /* fall-through */ + FALLTHROUGH; case LP_INTERP_LINEAR: if (attrib == 0 && chan == 0) { @@ -462,7 +462,7 @@ lp_build_interp_soa_indirect(struct lp_build_interp_soa_context *bld, dst_type.length = 1; switch (interp) { case LP_INTERP_PERSPECTIVE: - /* fall-through */ + FALLTHROUGH; case LP_INTERP_LINEAR: dadx = lp_build_gather(gallivm, coeff_bld->type.length, @@ -605,7 +605,7 @@ lp_build_interp_soa(struct lp_build_interp_soa_context *bld, switch (interp) { case LP_INTERP_PERSPECTIVE: - /* fall-through */ + FALLTHROUGH; case LP_INTERP_LINEAR: dadx = lp_build_extract_broadcast(gallivm, setup_bld->type, coeff_bld->type, bld->dadxaos[attrib], diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index d31f4d09a27..696612309eb 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -240,7 +240,7 @@ setup_point_coefficients( struct lp_setup_context *setup, case LP_INTERP_LINEAR: /* Sprite tex coords may use linear interpolation someday */ - /* fall-through */ + FALLTHROUGH; case LP_INTERP_PERSPECTIVE: { /* check if the sprite coord flag is set for this attribute. * If so, set it up so it up so x and y vary from 0 to 1. diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index 6119827474e..21ee5820270 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -439,7 +439,7 @@ ImmediateValue::applyLog2() case TYPE_S16: case TYPE_S32: assert(!this->isNegative()); - // fall through + FALLTHROUGH; case TYPE_U8: case TYPE_U16: case TYPE_U32: @@ -447,7 +447,7 @@ ImmediateValue::applyLog2() break; case TYPE_S64: assert(!this->isNegative()); - // fall through + FALLTHROUGH; case TYPE_U64: reg.data.u64 = util_logbase2_64(reg.data.u64); break; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp index 404d9420da4..453d541934e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp @@ -590,7 +590,7 @@ BuildUtil::split64BitOpPostRA(Function *fn, Instruction *i, hTy = TYPE_U32; break; } - /* fallthrough */ + FALLTHROUGH; default: return NULL; } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index 8116fb58f7d..02d0e3d6adb 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -221,9 +221,9 @@ CodeEmitterGK110::emitRoundMode(RoundMode rnd, const int pos, const int rintPos) uint8_t n; switch (rnd) { - case ROUND_MI: rint = true; /* fall through */ case ROUND_M: n = 1; break; - case ROUND_PI: rint = true; /* fall through */ case ROUND_P: n = 2; break; - case ROUND_ZI: rint = true; /* fall through */ case ROUND_Z: n = 3; break; + case ROUND_MI: rint = true; FALLTHROUGH; case ROUND_M: n = 1; break; + case ROUND_PI: rint = true; FALLTHROUGH; case ROUND_P: n = 2; break; + case ROUND_ZI: rint = true; FALLTHROUGH; case ROUND_Z: n = 3; break; default: rint = rnd == ROUND_NI; n = 0; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index 1d47f34968e..54d3cd794a8 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -2222,7 +2222,7 @@ Converter::visit(nir_intrinsic_instr *insn) break; case nir_intrinsic_bindless_image_samples: mask = 0x8; - /* fallthrough */ + FALLTHROUGH; case nir_intrinsic_image_samples: ty = TYPE_U32; bindless = op == nir_intrinsic_bindless_image_samples; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index b2e0fb0436e..ade9b2ffb15 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -1360,7 +1360,7 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl) break; case TGSI_SEMANTIC_PATCH: info_out->numPatchConstants = MAX2(info_out->numPatchConstants, si + 1); - /* fallthrough */ + FALLTHROUGH; case TGSI_SEMANTIC_TESSOUTER: case TGSI_SEMANTIC_TESSINNER: info_out->out[i].patch = 1; @@ -2066,7 +2066,7 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr) arrayid = code->tempArrayId[idx]; adjustTempIndex(arrayid, idx, idx2d); } - /* fallthrough */ + FALLTHROUGH; default: return getArrayForFile(src.getFile(), idx2d)->load( sub.cur->values, idx, swz, shiftAddress(ptr)); @@ -3335,7 +3335,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) break; case TGSI_OPCODE_UCMP: srcTy = TYPE_U32; - /* fallthrough */ + FALLTHROUGH; case TGSI_OPCODE_CMP: FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) { src0 = fetchSrc(0, c); @@ -3411,7 +3411,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) mkOp1(OP_BREV, TYPE_U32, val0, val0); mkOp1(OP_BFIND, TYPE_U32, val0, val0)->subOp = NV50_IR_SUBOP_BFIND_SAMT; src1 = val0; - /* fallthrough */ + FALLTHROUGH; case TGSI_OPCODE_READ_INVOC: if (tgsi.getOpcode() == TGSI_OPCODE_READ_INVOC) src1 = fetchSrc(1, 0); @@ -3542,7 +3542,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) /* handle user clip planes for each emitted vertex */ if (info_out->io.genUserClip > 0) handleUserClipPlanes(); - /* fallthrough */ + FALLTHROUGH; case TGSI_OPCODE_ENDPRIM: { // get vertex stream (must be immediate) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 7703df8f504..e45fc08f1b8 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -2913,7 +2913,7 @@ NVC0LoweringPass::handleRDSV(Instruction *i) i->setSrc(0, bld.mkImm(sv == SV_GRIDID ? 0 : 1)); return true; } - // Fallthrough + FALLTHROUGH; case SV_WORK_DIM: addr += prog->driver->prop.cp.gridInfoBase; bld.mkLoad(TYPE_U32, i->getDef(0), diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index ec599fcc81c..d011df45153 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -592,7 +592,7 @@ ConstantFolding::expr(Instruction *i, res.data.s32 = ((int64_t)a->data.s32 * b->data.s32) >> 32; break; } - /* fallthrough */ + FALLTHROUGH; case TYPE_U32: if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) { res.data.u32 = ((uint64_t)a->data.u32 * b->data.u32) >> 32; @@ -834,7 +834,7 @@ ConstantFolding::expr(Instruction *i, res.data.s32 = ((int64_t)a->data.s32 * b->data.s32 >> 32) + c->data.s32; break; } - /* fallthrough */ + FALLTHROUGH; case TYPE_U32: if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) { res.data.u32 = ((uint64_t)a->data.u32 * b->data.u32 >> 32) + c->data.u32; @@ -1193,7 +1193,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) if (imm0.isInteger(0) && s == 0 && typeSizeof(i->dType) == 8 && !isFloatType(i->dType)) break; - /* fallthrough */ + FALLTHROUGH; case OP_ADD: if (i->usesFlags()) break; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp index d2255c2cd2b..744a011cdde 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp @@ -54,7 +54,7 @@ TargetNVC0::getBuiltinCode(const uint32_t **code, uint32_t *size) const *size = sizeof(gk104_builtin_code); break; } - /* fall-through for GK20A */ + FALLTHROUGH; /* for GK20A */ case 0xf0: case 0x100: *code = (const uint32_t *)&gk110_builtin_code[0]; @@ -76,7 +76,7 @@ TargetNVC0::getBuiltinOffset(int builtin) const case 0xe0: if (chipset < NVISA_GK20A_CHIPSET) return gk104_builtin_offsets[builtin]; - /* fall-through for GK20A */ + FALLTHROUGH; /* for GK20A */ case 0xf0: case 0x100: return gk110_builtin_offsets[builtin]; @@ -579,7 +579,7 @@ int TargetNVC0::getLatency(const Instruction *i) const case OP_LOAD: if (i->src(0).getFile() == FILE_MEMORY_CONST) return 9; - // fall through + FALLTHROUGH; case OP_VFETCH: return 24; default: diff --git a/src/gallium/drivers/nouveau/nv30/nv30_texture.c b/src/gallium/drivers/nouveau/nv30/nv30_texture.c index 5d7505deec8..38edd65bc2d 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_texture.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_texture.c @@ -240,7 +240,7 @@ nv30_sampler_view_create(struct pipe_context *pipe, struct pipe_resource *pt, break; case PIPE_TEXTURE_CUBE: so->fmt |= NV30_3D_TEX_FORMAT_CUBIC; - /* fallthrough */ + FALLTHROUGH; case PIPE_TEXTURE_2D: case PIPE_TEXTURE_RECT: so->fmt |= NV30_3D_TEX_FORMAT_DIMS_2D; diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c index 2bcb62b97d8..d69cbc5c639 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c @@ -100,7 +100,7 @@ emit_src(struct nvfx_fpc *fpc, int pos, struct nvfx_src src) break; case NVFXSR_OUTPUT: sr |= NVFX_FP_REG_SRC_HALF; - /* fall-through */ + FALLTHROUGH; case NVFXSR_TEMP: sr |= (NVFX_FP_REG_TYPE_TEMP << NVFX_FP_REG_TYPE_SHIFT); sr |= (src.reg.index << NVFX_FP_REG_SRC_SHIFT); @@ -173,7 +173,7 @@ emit_dst(struct nvfx_fpc *fpc, struct nvfx_reg dst) hw[0] |= NVFX_FP_OP_OUT_REG_HALF; dst.index <<= 1; } - /* fall-through */ + FALLTHROUGH; case NVFXSR_TEMP: if (fpc->num_regs < (dst.index + 1)) fpc->num_regs = dst.index + 1; diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c index 83823a148b3..40708c80ae3 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c @@ -2,6 +2,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" +#include "util/compiler.h" #include "util/u_dynarray.h" #include "util/u_debug.h" #include "util/u_memory.h" @@ -844,7 +845,7 @@ nvfx_vertprog_parse_decl_output(struct nvfx_vpc *vpc, case TGSI_SEMANTIC_GENERIC: /* this is really an identifier for VP/FP linkage */ semantic_index += 8; - /* fall through */ + FALLTHROUGH; case TGSI_SEMANTIC_TEXCOORD: for (i = 0; i < num_texcoords; i++) { if (vpc->vp->texcoord[i] == semantic_index) { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c index 9578fc3d1c7..64f139fba7d 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c @@ -99,7 +99,7 @@ nv50_mt_choose_storage_type(struct nv50_miptree *mt, bool compressed) default: /* Most color formats don't work with compression. */ compressed = false; - /* fallthrough */ + FALLTHROUGH; case PIPE_FORMAT_R8G8B8A8_UNORM: case PIPE_FORMAT_R8G8B8A8_SRGB: case PIPE_FORMAT_R8G8B8X8_UNORM: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c index 259723b99c3..d91f46cf92b 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c @@ -240,7 +240,7 @@ nv50_hw_end_query(struct nv50_context *nv50, struct nv50_query *q) break; case PIPE_QUERY_TIMESTAMP: hq->sequence++; - /* fall through */ + FALLTHROUGH; case PIPE_QUERY_TIME_ELAPSED: nv50_hw_query_get(push, q, 0, 0x00005002); break; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 510467b4229..2dffde2b2ad 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -400,7 +400,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) debug_printf("%s: unhandled cap %d\n", __func__, param); debug_cap_printed[param] = true; } - /* fallthrough */ + FALLTHROUGH; /* caps where we want the default value */ case PIPE_CAP_DMABUF: case PIPE_CAP_ESSL_FEATURE_LEVEL: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c index 9d01a5eb636..59d4cbe88c7 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c @@ -466,7 +466,7 @@ nvc0_hw_get_query_result_resource(struct nvc0_context *nvc0, case PIPE_QUERY_TIME_ELAPSED: case PIPE_QUERY_TIMESTAMP: qoffset = 8; - /* fallthrough */ + FALLTHROUGH; default: assert(index == 0); stride = 1; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 6cc9c830c55..83b4bdae555 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -438,7 +438,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) debug_printf("%s: unhandled cap %d\n", __func__, param); debug_cap_printed[param] = true; } - /* fallthrough */ + FALLTHROUGH; /* caps where we want the default value */ case PIPE_CAP_DMABUF: case PIPE_CAP_ESSL_FEATURE_LEVEL: diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 9ed17ddbfc7..d20ecf042b2 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -429,13 +429,13 @@ panfrost_get_paramf(struct pipe_screen *screen, enum pipe_capf param) switch (param) { case PIPE_CAPF_MAX_LINE_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_LINE_WIDTH_AA: return 255.0; /* arbitrary */ case PIPE_CAPF_MAX_POINT_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_POINT_WIDTH_AA: return 1024.0; diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c index b539c5dcc82..1aac64b0159 100644 --- a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c +++ b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c @@ -43,6 +43,8 @@ #include "radeon_program_pair.h" #include "r300_fragprog_swizzle.h" +#include "util/compiler.h" + struct r300_emit_state { struct r300_fragment_program_compiler * compiler; @@ -112,9 +114,9 @@ static unsigned int translate_rgb_opcode(struct r300_fragment_program_compiler * case RC_OPCODE_FRC: return R300_ALU_OUTC_FRC; default: error("translate_rgb_opcode: Unknown opcode %s", rc_get_opcode_info(opcode)->Name); - /* fall through */ + FALLTHROUGH; case RC_OPCODE_NOP: - /* fall through */ + FALLTHROUGH; case RC_OPCODE_MAD: return R300_ALU_OUTC_MAD; case RC_OPCODE_MAX: return R300_ALU_OUTC_MAX; case RC_OPCODE_MIN: return R300_ALU_OUTC_MIN; @@ -134,9 +136,9 @@ static unsigned int translate_alpha_opcode(struct r300_fragment_program_compiler case RC_OPCODE_LG2: return R300_ALU_OUTA_LG2; default: error("translate_rgb_opcode: Unknown opcode %s", rc_get_opcode_info(opcode)->Name); - /* fall through */ + FALLTHROUGH; case RC_OPCODE_NOP: - /* fall through */ + FALLTHROUGH; case RC_OPCODE_MAD: return R300_ALU_OUTA_MAD; case RC_OPCODE_MAX: return R300_ALU_OUTA_MAX; case RC_OPCODE_MIN: return R300_ALU_OUTA_MIN; diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c index 810a79ac1e2..bd4b16117e3 100644 --- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c +++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c @@ -35,6 +35,8 @@ #include "radeon_emulate_loops.h" #include "radeon_remove_constants.h" +#include "util/compiler.h" + /* * Take an already-setup and valid source then swizzle it appropriately to * obtain a constant ZERO or ONE source. @@ -60,7 +62,7 @@ static unsigned long t_dst_class(rc_register_file file) switch (file) { default: fprintf(stderr, "%s: Bad register file %i\n", __FUNCTION__, file); - /* fall-through */ + FALLTHROUGH; case RC_FILE_TEMPORARY: return PVS_DST_REG_TEMPORARY; case RC_FILE_OUTPUT: @@ -84,7 +86,7 @@ static unsigned long t_src_class(rc_register_file file) switch (file) { default: fprintf(stderr, "%s: Bad register file %i\n", __FUNCTION__, file); - /* fall-through */ + FALLTHROUGH; case RC_FILE_NONE: case RC_FILE_TEMPORARY: return PVS_SRC_REG_TEMPORARY; diff --git a/src/gallium/drivers/r300/compiler/r500_fragprog.c b/src/gallium/drivers/r300/compiler/r500_fragprog.c index 4c415afcb05..8198ff2a36a 100644 --- a/src/gallium/drivers/r300/compiler/r500_fragprog.c +++ b/src/gallium/drivers/r300/compiler/r500_fragprog.c @@ -34,6 +34,8 @@ #include "radeon_variable.h" #include "r300_reg.h" +#include "util/compiler.h" + /** * Rewrite IF instructions to use the ALU result special register. */ @@ -138,13 +140,13 @@ int r500_transform_IF( break; case RC_OPCODE_SLE: reverse_srcs = 1; - /* Fall through */ + FALLTHROUGH; case RC_OPCODE_SGE: compare_func = RC_COMPARE_FUNC_GEQUAL; break; case RC_OPCODE_SGT: reverse_srcs = 1; - /* Fall through */ + FALLTHROUGH; case RC_OPCODE_SLT: compare_func = RC_COMPARE_FUNC_LESS; break; diff --git a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c index 46e7e6e469f..f6c0032514b 100644 --- a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c +++ b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c @@ -45,6 +45,8 @@ #include "radeon_program_pair.h" +#include "util/compiler.h" + #define PROG_CODE \ struct r500_fragment_program_code *code = &c->code->code.r500 @@ -101,9 +103,9 @@ static unsigned int translate_rgb_op(struct r300_fragment_program_compiler *c, r case RC_OPCODE_FRC: return R500_ALU_RGBA_OP_FRC; default: error("translate_rgb_op: unknown opcode %s\n", rc_get_opcode_info(opcode)->Name); - /* fall through */ + FALLTHROUGH; case RC_OPCODE_NOP: - /* fall through */ + FALLTHROUGH; case RC_OPCODE_MAD: return R500_ALU_RGBA_OP_MAD; case RC_OPCODE_MAX: return R500_ALU_RGBA_OP_MAX; case RC_OPCODE_MIN: return R500_ALU_RGBA_OP_MIN; @@ -126,9 +128,9 @@ static unsigned int translate_alpha_op(struct r300_fragment_program_compiler *c, case RC_OPCODE_LG2: return R500_ALPHA_OP_LN2; default: error("translate_alpha_op: unknown opcode %s\n", rc_get_opcode_info(opcode)->Name); - /* fall through */ + FALLTHROUGH; case RC_OPCODE_NOP: - /* fall through */ + FALLTHROUGH; case RC_OPCODE_MAD: return R500_ALPHA_OP_MAD; case RC_OPCODE_MAX: return R500_ALPHA_OP_MAX; case RC_OPCODE_MIN: return R500_ALPHA_OP_MIN; diff --git a/src/gallium/drivers/r300/compiler/radeon_opcodes.c b/src/gallium/drivers/r300/compiler/radeon_opcodes.c index a251bbe45d0..10033e02873 100644 --- a/src/gallium/drivers/r300/compiler/radeon_opcodes.c +++ b/src/gallium/drivers/r300/compiler/radeon_opcodes.c @@ -30,6 +30,8 @@ #include "radeon_program_constants.h" +#include "util/compiler.h" + struct rc_opcode_info rc_opcodes[MAX_RC_OPCODE] = { { .Opcode = RC_OPCODE_NOP, @@ -576,7 +578,7 @@ void rc_compute_sources_for_writemask( case RC_OPCODE_TXP: case RC_OPCODE_TXL: srcmasks[0] |= RC_MASK_W; - /* Fall through */ + FALLTHROUGH; case RC_OPCODE_TEX: switch (inst->U.I.TexSrcTarget) { case RC_TEXTURE_1D: @@ -598,7 +600,7 @@ void rc_compute_sources_for_writemask( switch (inst->U.I.TexSrcTarget) { case RC_TEXTURE_1D_ARRAY: srcmasks[0] |= RC_MASK_Y; - /* Fall through. */ + FALLTHROUGH; case RC_TEXTURE_1D: srcmasks[0] |= RC_MASK_X; srcmasks[1] |= RC_MASK_X; @@ -606,7 +608,7 @@ void rc_compute_sources_for_writemask( break; case RC_TEXTURE_2D_ARRAY: srcmasks[0] |= RC_MASK_Z; - /* Fall through. */ + FALLTHROUGH; case RC_TEXTURE_2D: case RC_TEXTURE_RECT: srcmasks[0] |= RC_MASK_XY; diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_translate.c b/src/gallium/drivers/r300/compiler/radeon_pair_translate.c index c6050bdf4dd..b75b658b862 100644 --- a/src/gallium/drivers/r300/compiler/radeon_pair_translate.c +++ b/src/gallium/drivers/r300/compiler/radeon_pair_translate.c @@ -30,6 +30,8 @@ #include "radeon_compiler.h" #include "radeon_compiler_util.h" +#include "util/compiler.h" + /** * Finally rewrite ADD, MOV, MUL as the appropriate native instruction @@ -120,7 +122,7 @@ static void classify_instruction(struct rc_sub_instruction * inst, break; case RC_OPCODE_DP4: *needalpha = 1; - /* fall through */ + FALLTHROUGH; case RC_OPCODE_DP3: *needrgb = 1; break; diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index b1c1d36d8a7..779c467a152 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -686,13 +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 */ + 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 */ + FALLTHROUGH; case 2: /* pipe 1 only */ /* As mentioned above, accommodate RV380 and older. */ @@ -700,7 +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 */ + 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 150fafe88be..b46d1937bd0 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; - /* fallthrough. */ + 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 69c4f61ee28..b04c3496730 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -274,7 +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 */ + FALLTHROUGH; case PIPE_FORMAT_LATC1_UNORM: case PIPE_FORMAT_RGTC1_UNORM: return R500_TX_FORMAT_ATI1N | result; @@ -282,7 +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 */ + FALLTHROUGH; case PIPE_FORMAT_RGTC2_UNORM: case PIPE_FORMAT_LATC2_UNORM: return R400_TX_FORMAT_ATI2N | result; diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index 3030698989d..7217dd09a31 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -30,6 +30,8 @@ #include "tgsi/tgsi_scan.h" #include "tgsi/tgsi_util.h" +#include "util/compiler.h" + static unsigned translate_opcode(unsigned opcode) { switch(opcode) { @@ -135,7 +137,7 @@ static unsigned translate_register_file(unsigned file) case TGSI_FILE_OUTPUT: return RC_FILE_OUTPUT; default: fprintf(stderr, "Unhandled register file: %i\n", file); - /* fall-through */ + FALLTHROUGH; case TGSI_FILE_TEMPORARY: return RC_FILE_TEMPORARY; case TGSI_FILE_ADDRESS: return RC_FILE_ADDRESS; } diff --git a/src/gallium/drivers/r600/eg_debug.c b/src/gallium/drivers/r600/eg_debug.c index 15cccb8d03f..853b610441f 100644 --- a/src/gallium/drivers/r600/eg_debug.c +++ b/src/gallium/drivers/r600/eg_debug.c @@ -256,7 +256,7 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw, COLOR_RESET "\n"); break; } - /* fallthrough *//* print all dwords */ + FALLTHROUGH; /* print all dwords */ default: for (i = 0; i < count+1; i++) { print_spaces(f, INDENT_PKT); @@ -305,7 +305,7 @@ static void eg_parse_ib(FILE *f, uint32_t *ib, int num_dw, int trace_id, num_dw--; break; } - /* fall through */ + FALLTHROUGH; default: fprintf(f, "Unknown packet type %i\n", type); return; diff --git a/src/gallium/drivers/r600/r600_buffer_common.c b/src/gallium/drivers/r600/r600_buffer_common.c index b09f6732804..7dbf7a1baaf 100644 --- a/src/gallium/drivers/r600/r600_buffer_common.c +++ b/src/gallium/drivers/r600/r600_buffer_common.c @@ -116,7 +116,7 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen, switch (res->b.b.usage) { case PIPE_USAGE_STREAM: res->flags = RADEON_FLAG_GTT_WC; - /* fall through */ + FALLTHROUGH; case PIPE_USAGE_STAGING: /* Transfers are likely to occur more often with these * resources. */ @@ -131,7 +131,7 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen, res->flags |= RADEON_FLAG_GTT_WC; break; } - /* fall through */ + FALLTHROUGH; case PIPE_USAGE_DEFAULT: case PIPE_USAGE_IMMUTABLE: default: diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index a07cfc38617..9e11c7442b6 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -571,7 +571,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, case PIPE_SHADER_COMPUTE: if (rscreen->b.family >= CHIP_CEDAR) break; - /* fallthrough */ + FALLTHROUGH; default: return 0; } diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index eaf9a14a37b..60e691f9e36 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -837,7 +837,7 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, break; case PIPE_QUERY_TIME_ELAPSED: va += 8; - /* fall through */ + FALLTHROUGH; case PIPE_QUERY_TIMESTAMP: r600_gfx_write_event_eop(ctx, EVENT_TYPE_BOTTOM_OF_PIPE_TS, 0, EOP_DATA_SEL_TIMESTAMP, NULL, va, @@ -1125,7 +1125,7 @@ static void r600_get_hw_query_params(struct r600_common_context *rctx, case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE: params->pair_count = R600_MAX_STREAMS; params->pair_stride = 32; - /* fallthrough */ + FALLTHROUGH; case PIPE_QUERY_SO_OVERFLOW_PREDICATE: params->start_offset = 0; params->end_offset = 16; diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 31570a387d0..c23adf2ea55 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -524,11 +524,11 @@ static int tgsi_is_supported(struct r600_shader_ctx *ctx) ctx->type == PIPE_SHADER_TESS_CTRL || ctx->type == PIPE_SHADER_TESS_EVAL) break; - /* fallthrough */ + FALLTHROUGH; case TGSI_FILE_OUTPUT: if (ctx->type == PIPE_SHADER_TESS_CTRL) break; - /* fallthrough */ + FALLTHROUGH; default: R600_ERR("unsupported src %d (file %d, dimension %d)\n", j, i->Src[j].Register.File, @@ -8188,7 +8188,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) r = r600_bytecode_add_alu(ctx->bc, &alu); if (r) return r; - /* fall through */ + FALLTHROUGH; case TGSI_TEXTURE_2D: case TGSI_TEXTURE_SHADOW2D: @@ -8209,7 +8209,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) r = r600_bytecode_add_alu(ctx->bc, &alu); if (r) return r; - /* fall through */ + FALLTHROUGH; case TGSI_TEXTURE_1D: case TGSI_TEXTURE_SHADOW1D: @@ -8233,7 +8233,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) switch (inst->Texture.Texture) { case TGSI_TEXTURE_3D: offset_z = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleZ] << 1; - /* fallthrough */ + FALLTHROUGH; case TGSI_TEXTURE_2D: case TGSI_TEXTURE_SHADOW2D: case TGSI_TEXTURE_RECT: @@ -8241,7 +8241,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) case TGSI_TEXTURE_2D_ARRAY: case TGSI_TEXTURE_SHADOW2D_ARRAY: offset_y = ctx->literals[4 * inst->TexOffsets[0].Index + inst->TexOffsets[0].SwizzleY] << 1; - /* fallthrough */ + FALLTHROUGH; case TGSI_TEXTURE_1D: case TGSI_TEXTURE_SHADOW1D: case TGSI_TEXTURE_1D_ARRAY: @@ -10444,7 +10444,7 @@ static inline int callstack_update_max_depth(struct r600_shader_ctx *ctx, * elements */ elements += 2; - /* fallthrough */ + FALLTHROUGH; /* FIXME: do the two elements added above cover the cases for the * r8xx+ below? */ diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index b1b7936859f..2ded6c82212 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2822,7 +2822,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, case PIPE_FORMAT_RGTC1_SNORM: case PIPE_FORMAT_LATC1_SNORM: word4 |= sign_bit[0]; - /* fallthrough */ + FALLTHROUGH; case PIPE_FORMAT_RGTC1_UNORM: case PIPE_FORMAT_LATC1_UNORM: result = FMT_BC4; @@ -2830,7 +2830,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, case PIPE_FORMAT_RGTC2_SNORM: case PIPE_FORMAT_LATC2_SNORM: word4 |= sign_bit[0] | sign_bit[1]; - /* fallthrough */ + FALLTHROUGH; case PIPE_FORMAT_RGTC2_UNORM: case PIPE_FORMAT_LATC2_UNORM: result = FMT_BC5; @@ -2876,7 +2876,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, goto out_word4; case PIPE_FORMAT_BPTC_RGB_FLOAT: word4 |= sign_bit[0] | sign_bit[1] | sign_bit[2]; - /* fall through */ + FALLTHROUGH; case PIPE_FORMAT_BPTC_RGB_UFLOAT: result = FMT_BC6; goto out_word4; diff --git a/src/gallium/drivers/r600/radeon_uvd.c b/src/gallium/drivers/r600/radeon_uvd.c index fa22ba586ae..e4766a72fef 100644 --- a/src/gallium/drivers/r600/radeon_uvd.c +++ b/src/gallium/drivers/r600/radeon_uvd.c @@ -1051,7 +1051,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context, if (templ->entrypoint > PIPE_VIDEO_ENTRYPOINT_BITSTREAM || info.family < CHIP_PALM) return vl_create_mpeg12_decoder(context, templ); - /* fall through */ + FALLTHROUGH; case PIPE_VIDEO_FORMAT_MPEG4: width = align(width, VL_MACROBLOCK_WIDTH); height = align(height, VL_MACROBLOCK_HEIGHT); diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp index d953830d7c2..88e0085fa14 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp @@ -933,7 +933,7 @@ r600_nir_64_to_vec2(nir_shader *sh) swizzle[2 * k] = swizzle[2 * k + 1] = alu->src[i].swizzle[k] * 2; break; } - /* fallthrough */ + FALLTHROUGH; default: swizzle[2 * k] = alu->src[i].swizzle[k] * 2; swizzle[2 * k + 1] = alu->src[i].swizzle[k] * 2 + 1; diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp index 8743da50e00..a830d075382 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp @@ -367,7 +367,7 @@ r600_lower_tess_io_impl(nir_builder *b, nir_instr *instr, enum pipe_prim_type pr case nir_intrinsic_load_tess_level_inner: tf_inner_address_offset = 4; ncomps_correct = 2; - /* fallthrough */ + FALLTHROUGH; case nir_intrinsic_load_tess_level_outer: { auto ncomps = outer_tf_components(prim_type); if (!ncomps) diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp index c5750fa2130..e37e2732b6d 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp @@ -124,7 +124,7 @@ bool ShaderFromNirProcessor::scan_instruction(nir_instr *instr) case nir_intrinsic_image_atomic_comp_swap: case nir_intrinsic_ssbo_atomic_comp_swap: m_sel.info.writes_memory = 1; - /* fallthrough */ + FALLTHROUGH; case nir_intrinsic_image_load: m_ssbo_instr.set_require_rat_return_address(); break; diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp index 669cd25d1ea..b13cb8a8a1d 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp @@ -161,7 +161,7 @@ bool FragmentShaderFromNir::process_load_input(nir_intrinsic_instr *instr, tgsi_interpolate = TGSI_INTERPOLATE_COLOR; break; } - /* fallthrough */ + FALLTHROUGH; case INTERP_MODE_SMOOTH: tgsi_interpolate = TGSI_INTERPOLATE_PERSPECTIVE; break; @@ -206,7 +206,7 @@ bool FragmentShaderFromNir::process_load_input(nir_intrinsic_instr *instr, case TGSI_SEMANTIC_PRIMID: sh_info().gs_prim_id_input = true; sh_info().ps_prim_id_input = m_shaderio.inputs().size(); - /* fallthrough */ + FALLTHROUGH; case TGSI_SEMANTIC_FOG: case TGSI_SEMANTIC_GENERIC: case TGSI_SEMANTIC_TEXCOORD: @@ -252,7 +252,7 @@ bool FragmentShaderFromNir::scan_sysvalue_access(nir_instr *instr) break; case nir_intrinsic_load_sample_pos: m_sv_values.set(es_sample_pos); - /* fallthrough */ + FALLTHROUGH; case nir_intrinsic_load_sample_id: m_sv_values.set(es_sample_id); break; diff --git a/src/gallium/drivers/r600/sfn/sfn_shaderio.cpp b/src/gallium/drivers/r600/sfn/sfn_shaderio.cpp index c398975a1c5..1ac94ccc786 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shaderio.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shaderio.cpp @@ -165,7 +165,7 @@ ShaderInputVarying::ShaderInputVarying(tgsi_semantic _name, int sid, nir_variabl m_ij_index = 0; break; } - /* fall-through */ + FALLTHROUGH; case INTERP_MODE_SMOOTH: assert(!glsl_base_type_is_integer(base_type)); diff --git a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp index c1e4cf78272..ff49216a9b4 100644 --- a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp @@ -115,7 +115,7 @@ bool VertexStageExportForFS::do_store_output(const store_loc& store_info, nir_in case VARYING_SLOT_PSIZ: m_proc.sh_info().vs_out_point_size = 1; m_proc.sh_info().vs_out_misc_write = 1; - /* fallthrough */ + FALLTHROUGH; case VARYING_SLOT_POS: return emit_varying_pos(store_info, instr); case VARYING_SLOT_EDGE: { @@ -186,7 +186,7 @@ bool VertexStageExportForFS::emit_varying_pos(const store_loc &store_info, nir_i m_proc.emit_instruction(op1_flt_to_int, value.reg_i(1), {value.reg_i(1)}, {alu_write, alu_last_instr}); m_proc.sh_info().output[store_info.driver_location].write_mask = 0xf; } - /* fallthrough */ + FALLTHROUGH; case VARYING_SLOT_PSIZ: case VARYING_SLOT_LAYER: export_slot = 1; diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c index 6fecb71c9e9..f355e690869 100644 --- a/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -453,7 +453,7 @@ blend_quad(struct quad_stage *qs, VEC4_COPY(source[3], quadColor[3]); /* A */ break; case PIPE_BLENDFACTOR_SRC_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_SRC_ALPHA: { const float *alpha = quadColor[3]; @@ -461,7 +461,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_DST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_DST_ALPHA: VEC4_MUL(source[3], quadColor[3], dest[3]); /* A */ break; @@ -470,7 +470,7 @@ blend_quad(struct quad_stage *qs, VEC4_COPY(source[3], quadColor[3]); /* A */ break; case PIPE_BLENDFACTOR_CONST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_CONST_ALPHA: { float comp[4]; @@ -482,7 +482,7 @@ blend_quad(struct quad_stage *qs, VEC4_COPY(source[3], zero); /* A */ break; case PIPE_BLENDFACTOR_INV_SRC_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_SRC_ALPHA: { float inv_alpha[4]; @@ -491,7 +491,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_INV_DST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_DST_ALPHA: { float inv_alpha[4]; @@ -500,7 +500,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_INV_CONST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_CONST_ALPHA: { float inv_comp[4]; @@ -510,7 +510,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_SRC1_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_SRC1_ALPHA: { const float *alpha = quadColor2[3]; @@ -518,7 +518,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_INV_SRC1_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_SRC1_ALPHA: { float inv_alpha[4]; @@ -705,12 +705,12 @@ blend_quad(struct quad_stage *qs, /* blend_dest = blend_dest * 1 NO-OP, leave blend_dest as-is */ break; case PIPE_BLENDFACTOR_SRC_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_SRC_ALPHA: VEC4_MUL(blend_dest[3], blend_dest[3], quadColor[3]); /* A * A */ break; case PIPE_BLENDFACTOR_DST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_DST_ALPHA: VEC4_MUL(blend_dest[3], blend_dest[3], blend_dest[3]); /* A */ break; @@ -718,7 +718,7 @@ blend_quad(struct quad_stage *qs, /* blend_dest = blend_dest * 1 NO-OP, leave blend_dest as-is */ break; case PIPE_BLENDFACTOR_CONST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_CONST_ALPHA: { float comp[4]; @@ -730,7 +730,7 @@ blend_quad(struct quad_stage *qs, VEC4_COPY(blend_dest[3], zero); /* A */ break; case PIPE_BLENDFACTOR_INV_SRC_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_SRC_ALPHA: { float one_minus_alpha[TGSI_QUAD_SIZE]; @@ -739,7 +739,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_INV_DST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_DST_ALPHA: { float inv_comp[4]; @@ -748,7 +748,7 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_INV_CONST_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_CONST_ALPHA: { float inv_comp[4]; @@ -757,12 +757,12 @@ blend_quad(struct quad_stage *qs, } break; case PIPE_BLENDFACTOR_SRC1_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_SRC1_ALPHA: VEC4_MUL(blend_dest[3], blend_dest[3], quadColor2[3]); /* A * A */ break; case PIPE_BLENDFACTOR_INV_SRC1_COLOR: - /* fall-through */ + FALLTHROUGH; case PIPE_BLENDFACTOR_INV_SRC1_ALPHA: { float one_minus_alpha[TGSI_QUAD_SIZE]; diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index 91fa0c6a990..08017799190 100644 --- a/src/gallium/drivers/softpipe/sp_query.c +++ b/src/gallium/drivers/softpipe/sp_query.c @@ -155,7 +155,7 @@ softpipe_end_query(struct pipe_context *pipe, struct pipe_query *q) break; case PIPE_QUERY_TIMESTAMP: sq->start = 0; - /* fall through */ + FALLTHROUGH; case PIPE_QUERY_TIME_ELAPSED: sq->end = os_time_get_nano(); break; diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 65b01dd8a9d..b652b4d260e 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -346,11 +346,11 @@ softpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param) { switch (param) { case PIPE_CAPF_MAX_LINE_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_LINE_WIDTH_AA: return 255.0; /* arbitrary */ case PIPE_CAPF_MAX_POINT_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_POINT_WIDTH_AA: return 255.0; /* arbitrary */ case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY: diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index c64337dc5e9..4f5721cba4f 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -1289,7 +1289,7 @@ sp_setup_point(struct setup_context *setup, switch (sinfo->attrib[fragSlot].interp) { case SP_INTERP_CONSTANT: - /* fall-through */ + FALLTHROUGH; case SP_INTERP_LINEAR: for (j = 0; j < TGSI_NUM_CHANNELS; j++) const_coeff(setup, &setup->coef[fragSlot], vertSlot, j); diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index bb2f546d67d..832c50e7cf5 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -369,7 +369,7 @@ svga_translate_format(const struct svga_screen *ss, case PIPE_FORMAT_Z32_UNORM: /* SVGA3D_Z_D32 is not yet unsupported */ - /* fall-through */ + FALLTHROUGH; default: return SVGA3D_FORMAT_INVALID; } diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index ab7d3876760..39ac45e5847 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -983,7 +983,7 @@ svga_texture_create(struct pipe_screen *screen, break; case PIPE_TEXTURE_1D_ARRAY: tex->key.flags |= SVGA3D_SURFACE_1D; - /* fall-through */ + FALLTHROUGH; case PIPE_TEXTURE_2D_ARRAY: tex->key.flags |= SVGA3D_SURFACE_ARRAY; tex->key.arraySize = template->array_size; diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 716c0297cad..2537ac7a899 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -159,7 +159,7 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_capf param) return svgascreen->maxLineWidthAA; case PIPE_CAPF_MAX_POINT_WIDTH: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_POINT_WIDTH_AA: return svgascreen->maxPointSize; @@ -170,9 +170,9 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_capf param) return 15.0; case PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE: - /* fall-through */ + FALLTHROUGH; case PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY: return 0.0f; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index f5a79bd997a..9645a04a3d8 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -981,13 +981,13 @@ translate_opcode(enum tgsi_opcode opcode) * only the TGSI_SEMANTIC_SAMPLEPOS system value which contains the * position of the current sample in the render target. */ - /* FALL-THROUGH */ + FALLTHROUGH; case TGSI_OPCODE_SAMPLE_INFO: /* NOTE: we never actually get this opcode because the GLSL compiler * implements the gl_NumSamples variable with a simple constant in the * constant buffer. */ - /* FALL-THROUGH */ + FALLTHROUGH; default: assert(!"Unexpected TGSI opcode in translate_opcode()"); return VGPU10_OPCODE_NOP; @@ -9321,7 +9321,7 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, case TGSI_OPCODE_IABS: return emit_iabs(emit, inst); case TGSI_OPCODE_ARL: - /* fall-through */ + FALLTHROUGH; case TGSI_OPCODE_UARL: return emit_arl_uarl(emit, inst); case TGSI_OPCODE_BGNSUB: @@ -10246,7 +10246,7 @@ emit_temp_tessfactor_instructions(struct svga_shader_emitter_v10 *emit) emit->tes.inner.in_index + 1, TGSI_SWIZZLE_X); dst = writemask_dst(&dst, TGSI_WRITEMASK_Y); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &dst, &src); - /* fallthrough */ + FALLTHROUGH; case PIPE_PRIM_TRIANGLES: src = make_src_scalar_reg(TGSI_FILE_INPUT, emit->tes.inner.in_index, TGSI_SWIZZLE_X); @@ -10278,13 +10278,13 @@ emit_temp_tessfactor_instructions(struct svga_shader_emitter_v10 *emit) emit->tes.outer.in_index + 3, TGSI_SWIZZLE_X); dst = writemask_dst(&dst, TGSI_WRITEMASK_W); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &dst, &src); - /* fallthrough */ + FALLTHROUGH; case PIPE_PRIM_TRIANGLES: src = make_src_scalar_reg(TGSI_FILE_INPUT, emit->tes.outer.in_index + 2, TGSI_SWIZZLE_X); dst = writemask_dst(&dst, TGSI_WRITEMASK_Z); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &dst, &src); - /* fallthrough */ + FALLTHROUGH; case PIPE_PRIM_LINES: src = make_src_scalar_reg(TGSI_FILE_INPUT, emit->tes.outer.in_index + 1, TGSI_SWIZZLE_X); diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp index a224a52755c..80959809806 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp @@ -34,6 +34,8 @@ #include "gen_state_llvm.h" #include "functionpasses/passes.h" +#include "util/compiler.h" + // components with bit-widths <= the QUANTIZE_THRESHOLD will be quantized #define QUANTIZE_THRESHOLD 2 @@ -771,7 +773,7 @@ struct BlendJit : public Builder case SWR_TYPE_UNKNOWN: case SWR_TYPE_UNUSED: - // fallthrough + FALLTHROUGH; case SWR_TYPE_UINT: case SWR_TYPE_SINT: @@ -810,7 +812,7 @@ struct BlendJit : public Builder case SWR_TYPE_UNKNOWN: case SWR_TYPE_UNUSED: - // fallthrough + FALLTHROUGH; case SWR_TYPE_UINT: case SWR_TYPE_SINT: diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c index a63190144f0..d7cfa735310 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c @@ -406,7 +406,7 @@ vc4_logicop(nir_builder *b, int logicop_func, return nir_imm_int(b, ~0); default: fprintf(stderr, "Unknown logic op %d\n", logicop_func); - /* FALLTHROUGH */ + FALLTHROUGH; case PIPE_LOGICOP_COPY: return src; } diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 007af9427ad..b5ceccc4daa 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -144,7 +144,7 @@ vc4_nir_get_swizzled_channel(nir_builder *b, nir_ssa_def **srcs, int swiz) default: case PIPE_SWIZZLE_NONE: fprintf(stderr, "warning: unknown swizzle\n"); - /* FALLTHROUGH */ + FALLTHROUGH; case PIPE_SWIZZLE_0: return nir_imm_float(b, 0.0); case PIPE_SWIZZLE_1: diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index 501d69f57af..76f0741cc03 100644 --- a/src/gallium/drivers/virgl/virgl_resource.c +++ b/src/gallium/drivers/virgl/virgl_resource.c @@ -400,7 +400,7 @@ virgl_resource_transfer_map(struct pipe_context *ctx, break; } vws->resource_reference(vws, &trans->hw_res, vres->hw_res); - /* fall through */ + FALLTHROUGH; case VIRGL_TRANSFER_MAP_HW_RES: trans->hw_res_map = vws->resource_map(vws, vres->hw_res); if (trans->hw_res_map) diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 5755818d3ad..8f7a4c7621a 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -127,7 +127,7 @@ convert_query_type(unsigned query_type, bool *precise) switch (query_type) { case PIPE_QUERY_OCCLUSION_COUNTER: *precise = true; - /* fallthrough */ + FALLTHROUGH; case PIPE_QUERY_OCCLUSION_PREDICATE: case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: return VK_QUERY_TYPE_OCCLUSION; diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 5cf4e812fa8..efd7a6e5df8 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -311,7 +311,7 @@ create_ici(struct zink_screen *screen, const struct pipe_resource *templ, unsign case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: ici.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; - /* fall-through */ + FALLTHROUGH; case PIPE_TEXTURE_2D: case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_RECT: diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index 458d7d42696..c54acdda4db 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -989,7 +989,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list, attribs.profile = ST_PROFILE_OPENGL_CORE; break; } - /* fall-through */ + FALLTHROUGH; case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: /* * The spec also says: diff --git a/src/gallium/frontends/nine/nine_shader.c b/src/gallium/frontends/nine/nine_shader.c index 07d891968a8..b365362cfed 100644 --- a/src/gallium/frontends/nine/nine_shader.c +++ b/src/gallium/frontends/nine/nine_shader.c @@ -1242,7 +1242,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) ureg_ADD(ureg, tmp, ureg_imm1f(ureg, 1.0f), ureg_negate(src)); src = ureg_src(tmp); } - /* fall through */ + FALLTHROUGH; case NINED3DSPSM_COMP: tmp = tx_scratch(tx); ureg_ADD(ureg, tmp, ureg_imm1f(ureg, 1.0f), ureg_negate(src)); diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c index 38ac4b7a52f..c1b69e339da 100644 --- a/src/gallium/frontends/osmesa/osmesa.c +++ b/src/gallium/frontends/osmesa/osmesa.c @@ -313,7 +313,7 @@ osmesa_choose_format(GLenum format, GLenum type) return PIPE_FORMAT_NONE; return PIPE_FORMAT_B5G6R5_UNORM; default: - ; /* fall-through */ + FALLTHROUGH; } return PIPE_FORMAT_NONE; } @@ -890,7 +890,7 @@ OSMesaGetIntegerv(GLint pname, GLint *value) *value = osmesa->y_up; return; case OSMESA_MAX_WIDTH: - /* fall-through */ + FALLTHROUGH; case OSMESA_MAX_HEIGHT: { struct pipe_screen *screen = get_st_manager()->screen; diff --git a/src/gallium/frontends/vdpau/vdpau_private.h b/src/gallium/frontends/vdpau/vdpau_private.h index 84889575cc0..68523e3214a 100644 --- a/src/gallium/frontends/vdpau/vdpau_private.h +++ b/src/gallium/frontends/vdpau/vdpau_private.h @@ -145,7 +145,7 @@ FormatYCBCRToPipe(VdpYCbCrFormat vdpau_format) default: /* NOTE: Can't be "unreachable", as it's quite reachable. */ assert(!"unexpected VdpYCbCrFormat"); - /* fallthrough */ + FALLTHROUGH; #ifdef VDP_YCBCR_FORMAT_Y_UV_444 case VDP_YCBCR_FORMAT_Y_UV_444: #endif diff --git a/src/gallium/frontends/wgl/stw_context.c b/src/gallium/frontends/wgl/stw_context.c index e2f059835f0..71b2ede10f9 100644 --- a/src/gallium/frontends/wgl/stw_context.c +++ b/src/gallium/frontends/wgl/stw_context.c @@ -35,6 +35,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_context.h" #include "pipe/p_state.h" +#include "util/compiler.h" #include "util/u_memory.h" #include "util/u_atomic.h" #include "frontend/api.h" @@ -238,7 +239,7 @@ stw_create_context_attribs(HDC hdc, INT iLayerPlane, DHGLRC hShareContext, attribs.profile = ST_PROFILE_OPENGL_CORE; break; } - /* fall-through */ + FALLTHROUGH; case WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: /* * The spec also says: diff --git a/src/intel/compiler/brw_compile_sf.c b/src/intel/compiler/brw_compile_sf.c index b0dc0d5235c..70c4dbf5a18 100644 --- a/src/intel/compiler/brw_compile_sf.c +++ b/src/intel/compiler/brw_compile_sf.c @@ -167,9 +167,9 @@ static void do_twoside_color( struct brw_sf_compile *c ) brw_IF(p, BRW_EXECUTE_4); { switch (c->nr_verts) { - case 3: copy_bfc(c, c->vert[2]); /* fallthrough */ - case 2: copy_bfc(c, c->vert[1]); /* fallthrough */ - case 1: copy_bfc(c, c->vert[0]); /* fallthrough */ + case 3: copy_bfc(c, c->vert[2]); FALLTHROUGH; + case 2: copy_bfc(c, c->vert[1]); FALLTHROUGH; + case 1: copy_bfc(c, c->vert[0]); } } brw_ENDIF(p); diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c index f743daf955d..330af60b2bd 100644 --- a/src/intel/compiler/brw_disasm.c +++ b/src/intel/compiler/brw_disasm.c @@ -2066,7 +2066,7 @@ brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo, case HSW_DATAPORT_DC_PORT1_TYPED_ATOMIC_OP: case HSW_DATAPORT_DC_PORT1_ATOMIC_COUNTER_OP: format(file, "SIMD%d,", (msg_ctrl & (1 << 4)) ? 8 : 16); - /* fallthrough */ + FALLTHROUGH; case HSW_DATAPORT_DC_PORT1_UNTYPED_ATOMIC_OP_SIMD4X2: case HSW_DATAPORT_DC_PORT1_TYPED_ATOMIC_OP_SIMD4X2: case HSW_DATAPORT_DC_PORT1_ATOMIC_COUNTER_OP_SIMD4X2: diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index c6a09dbcb9f..3f2c17d30d9 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -2909,7 +2909,7 @@ brw_find_next_block_end(struct brw_codegen *p, int start_offset) */ if (!while_jumps_before_offset(devinfo, insn, offset, start_offset)) continue; - /* fallthrough */ + FALLTHROUGH; case BRW_OPCODE_ELSE: case BRW_OPCODE_HALT: if (depth == 0) diff --git a/src/intel/compiler/brw_fs_builder.h b/src/intel/compiler/brw_fs_builder.h index 0a925a3731e..7b77808b8a7 100644 --- a/src/intel/compiler/brw_fs_builder.h +++ b/src/intel/compiler/brw_fs_builder.h @@ -822,7 +822,7 @@ namespace brw { src.width != BRW_WIDTH_8 || src.hstride != BRW_HORIZONTAL_STRIDE_1) break; - /* fallthrough */ + FALLTHROUGH; case ATTR: case VGRF: case UNIFORM: diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp index 181c9e21431..18ae9e99bb4 100644 --- a/src/intel/compiler/brw_fs_copy_propagation.cpp +++ b/src/intel/compiler/brw_fs_copy_propagation.cpp @@ -778,7 +778,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) /* FINISHME: Promote non-float constants and remove this. */ if (devinfo->ver < 8) break; - /* fallthrough */ + FALLTHROUGH; case SHADER_OPCODE_POW: /* Allow constant propagation into src1 (except on Gen 6 which * doesn't support scalar source math), and let constant combining @@ -786,7 +786,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) */ if (devinfo->ver == 6) break; - /* fallthrough */ + FALLTHROUGH; case BRW_OPCODE_BFI1: case BRW_OPCODE_ASR: case BRW_OPCODE_SHL: diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index aef20e440af..938133bd77a 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -62,7 +62,7 @@ brw_reg_from_fs_reg(const struct gen_device_info *devinfo, fs_inst *inst, switch (reg->file) { case MRF: assert((reg->nr & ~BRW_MRF_COMPR4) < BRW_MAX_MRF(devinfo->ver)); - /* Fallthrough */ + FALLTHROUGH; case VGRF: if (reg->stride == 0) { brw_reg = brw_vec1_reg(brw_file_from_reg(reg), reg->nr, 0); diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 5feac0a17f0..5181ce9000e 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -1049,7 +1049,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr, break; op[0].type = BRW_REGISTER_TYPE_D; op[0].negate = !op[0].negate; - /* fallthrough */ + FALLTHROUGH; case nir_op_i2f64: case nir_op_i2i64: case nir_op_u2f64: @@ -1174,7 +1174,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr, bld.emit(SHADER_OPCODE_RND_MODE, bld.null_reg_ud(), brw_imm_d(rnd)); } - /* fallthrough */ + FALLTHROUGH; case nir_op_iadd: inst = bld.ADD(result, op[0], op[1]); break; @@ -1624,7 +1624,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr, case nir_op_unpack_half_2x16_split_x_flush_to_zero: assert(FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP16 & execution_mode); - /* Fall-through */ + FALLTHROUGH; case nir_op_unpack_half_2x16_split_x: inst = bld.emit(BRW_OPCODE_F16TO32, result, subscript(op[0], BRW_REGISTER_TYPE_UW, 0)); @@ -1632,7 +1632,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr, case nir_op_unpack_half_2x16_split_y_flush_to_zero: assert(FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP16 & execution_mode); - /* Fall-through */ + FALLTHROUGH; case nir_op_unpack_half_2x16_split_y: inst = bld.emit(BRW_OPCODE_F16TO32, result, subscript(op[0], BRW_REGISTER_TYPE_UW, 1)); @@ -4255,7 +4255,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr case nir_intrinsic_scoped_barrier: assert(nir_intrinsic_execution_scope(instr) == NIR_SCOPE_NONE); - /* Fall through. */ + FALLTHROUGH; case nir_intrinsic_group_memory_barrier: case nir_intrinsic_memory_barrier_shared: case nir_intrinsic_memory_barrier_buffer: diff --git a/src/intel/compiler/brw_nir_lower_rt_intrinsics.c b/src/intel/compiler/brw_nir_lower_rt_intrinsics.c index d5d95b97fce..926e29d7266 100644 --- a/src/intel/compiler/brw_nir_lower_rt_intrinsics.c +++ b/src/intel/compiler/brw_nir_lower_rt_intrinsics.c @@ -72,7 +72,7 @@ lower_rt_intrinsics_impl(nir_function_impl *impl, stage == MESA_SHADER_CLOSEST_HIT); brw_nir_rt_load_mem_ray(b, &object_ray_in, BRW_RT_BVH_LEVEL_OBJECT); - /* Fall through */ + FALLTHROUGH; case MESA_SHADER_MISS: brw_nir_rt_load_mem_ray(b, &world_ray_in, diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp index efd9b8bcb02..5382f259b88 100644 --- a/src/intel/compiler/brw_shader.cpp +++ b/src/intel/compiler/brw_shader.cpp @@ -871,7 +871,7 @@ backend_instruction::is_commutative() const conditional_mod == BRW_CONDITIONAL_L) { return true; } - /* fallthrough */ + FALLTHROUGH; default: return false; } diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp index 3f7a39a7c50..08945d6c437 100644 --- a/src/intel/compiler/brw_vec4.cpp +++ b/src/intel/compiler/brw_vec4.cpp @@ -2066,7 +2066,7 @@ vec4_visitor::convert_to_hw_regs() reg = src.as_brw_reg(); break; } - /* fallthrough */ + FALLTHROUGH; case ARF: case IMM: continue; diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 966bc223f84..664dda1dd26 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -699,7 +699,7 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr) case nir_intrinsic_scoped_barrier: assert(nir_intrinsic_execution_scope(instr) == NIR_SCOPE_NONE); - /* Fall through. */ + FALLTHROUGH; case nir_intrinsic_memory_barrier: { const vec4_builder bld = vec4_builder(this).at_end().annotate(current_annotation, base_ir); @@ -1173,7 +1173,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_iadd: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* fall through */ + FALLTHROUGH; case nir_op_fadd: try_immediate_source(instr, op, true); inst = emit(ADD(dst, op[0], op[1])); @@ -1402,7 +1402,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_imin: case nir_op_umin: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* fall through */ + FALLTHROUGH; case nir_op_fmin: try_immediate_source(instr, op, true); inst = emit_minmax(BRW_CONDITIONAL_L, dst, op[0], op[1]); @@ -1411,7 +1411,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_imax: case nir_op_umax: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* fall through */ + FALLTHROUGH; case nir_op_fmax: try_immediate_source(instr, op, true); inst = emit_minmax(BRW_CONDITIONAL_GE, dst, op[0], op[1]); @@ -1432,7 +1432,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_ieq32: case nir_op_ine32: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* Fallthrough */ + FALLTHROUGH; case nir_op_flt32: case nir_op_fge32: case nir_op_feq32: @@ -1467,7 +1467,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_b32all_iequal3: case nir_op_b32all_iequal4: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* Fallthrough */ + FALLTHROUGH; case nir_op_b32all_fequal2: case nir_op_b32all_fequal3: case nir_op_b32all_fequal4: { @@ -1486,7 +1486,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) case nir_op_b32any_inequal3: case nir_op_b32any_inequal4: assert(nir_dest_bit_size(instr->dest.dest) < 64); - /* Fallthrough */ + FALLTHROUGH; case nir_op_b32any_fnequal2: case nir_op_b32any_fnequal3: case nir_op_b32any_fnequal4: { @@ -1919,7 +1919,7 @@ vec4_visitor::nir_emit_jump(nir_jump_instr *instr) break; case nir_jump_return: - /* fall through */ + FALLTHROUGH; default: unreachable("unknown jump"); } diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 76a80eb1338..8d2b2d41e82 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -1810,7 +1810,7 @@ isl_surf_get_hiz_surf(const struct isl_device *dev, assert(ISL_GFX_VER(dev) == 5); unreachable("This should work, but is untested"); } - /* Fall through */ + FALLTHROUGH; case ISL_FORMAT_R16_UNORM: case ISL_FORMAT_R32_FLOAT: break; @@ -1819,7 +1819,7 @@ isl_surf_get_hiz_surf(const struct isl_device *dev, assert(isl_surf_usage_is_depth_and_stencil(surf->usage)); unreachable("This should work, but is untested"); } - /* Fall through */ + FALLTHROUGH; default: return false; } diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index e53613439cc..b413e4b3c6f 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -43,6 +43,7 @@ #include #include "c99_compat.h" +#include "util/compiler.h" #include "util/macros.h" #include "util/format/u_format.h" diff --git a/src/intel/isl/isl_aux_info.c b/src/intel/isl/isl_aux_info.c index 64cbce6e1be..a2280766e36 100644 --- a/src/intel/isl/isl_aux_info.c +++ b/src/intel/isl/isl_aux_info.c @@ -142,7 +142,7 @@ isl_aux_prepare_access(enum isl_aux_state initial_state, case ISL_AUX_STATE_COMPRESSED_CLEAR: if (!info[usage].compressed) return ISL_AUX_OP_FULL_RESOLVE; - /* Fall-through */ + FALLTHROUGH; case ISL_AUX_STATE_CLEAR: case ISL_AUX_STATE_PARTIAL_CLEAR: return fast_clear_supported ? diff --git a/src/intel/perf/gen_perf_query.c b/src/intel/perf/gen_perf_query.c index 7ff795ca052..10f9b970926 100644 --- a/src/intel/perf/gen_perf_query.c +++ b/src/intel/perf/gen_perf_query.c @@ -36,6 +36,7 @@ #include "drm-uapi/i915_drm.h" +#include "util/compiler.h" #include "util/u_math.h" #define FILE_DEBUG_FLAG DEBUG_PERFMON @@ -1055,8 +1056,7 @@ read_oa_samples_for_query(struct gen_perf_context *perf_ctx, /* Read the reports until the end timestamp. */ switch (read_oa_samples_until(perf_ctx, start[1], end[1])) { case OA_READ_STATUS_ERROR: - /* Fallthrough and let accumulate_oa_reports() deal with the - * error. */ + FALLTHROUGH; /* Let accumulate_oa_reports() deal with the error. */ case OA_READ_STATUS_FINISHED: return true; case OA_READ_STATUS_UNFINISHED: diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 6cc79b97845..62f8207d40d 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -1433,7 +1433,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2( external_props->externalMemoryProperties = android_image_props; break; } - /* fallthrough - if ahw not supported */ + FALLTHROUGH; /* If ahw not supported */ default: /* From the Vulkan 1.0.42 spec: * @@ -1526,7 +1526,7 @@ void anv_GetPhysicalDeviceExternalBufferProperties( pExternalBufferProperties->externalMemoryProperties = android_buffer_props; return; } - /* fallthrough if ahw not supported */ + FALLTHROUGH; /* If ahw not supported */ default: goto unsupported; } diff --git a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c index f8fb67ba646..c4d5720a44a 100644 --- a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c +++ b/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c @@ -133,7 +133,7 @@ create_plane_tex_instr_implicit(struct ycbcr_state *state, plane_format)); break; } - /* fall through */ + FALLTHROUGH; default: nir_src_copy(&tex->src[i].src, &old_tex->src[i].src, tex); break; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 205eca771c8..d42773af999 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3533,7 +3533,7 @@ anv_image_aspect_to_plane(VkImageAspectFlags image_aspects, case VK_IMAGE_ASPECT_STENCIL_BIT: if ((image_aspects & VK_IMAGE_ASPECT_DEPTH_BIT) == 0) return 0; - /* Fall-through */ + FALLTHROUGH; case VK_IMAGE_ASPECT_PLANE_1_BIT: return 1; case VK_IMAGE_ASPECT_PLANE_2_BIT: diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index f790291e86b..91d0798c2bd 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -1861,7 +1861,7 @@ anv_wait_for_fences(struct anv_device *device, switch (impl->type) { case ANV_FENCE_TYPE_BO: assert(!device->physical->has_syncobj_wait); - /* fall-through */ + FALLTHROUGH; case ANV_FENCE_TYPE_WSI_BO: result = anv_wait_for_bo_fences(device, 1, &pFences[i], true, abs_timeout); diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 885e3e4209f..1798e1e497f 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; - /* fallthrough */ + 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 bba54c802a7..8e813ff70c5 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]; - /* fallthrough */ + 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_tex_image.c b/src/mesa/drivers/dri/i965/brw_tex_image.c index 854fdef9b36..2f95918e56e 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_image.c +++ b/src/mesa/drivers/dri/i965/brw_tex_image.c @@ -83,14 +83,14 @@ brw_miptree_create_for_teximage(struct brw_context *brw, case GL_TEXTURE_3D: depth = old_mt ? get_base_dim(old_depth, depth, level) : depth << level; - /* Fall through */ + FALLTHROUGH; case GL_TEXTURE_2D: case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP_ARRAY: height = old_mt ? get_base_dim(old_height, height, level) : height << level; - /* Fall through */ + FALLTHROUGH; case GL_TEXTURE_1D: case GL_TEXTURE_1D_ARRAY: width = old_mt ? get_base_dim(old_width, width, level) : diff --git a/src/mesa/drivers/dri/i965/brw_tex_validate.c b/src/mesa/drivers/dri/i965/brw_tex_validate.c index 43fbcdc7509..696655673fd 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_validate.c +++ b/src/mesa/drivers/dri/i965/brw_tex_validate.c @@ -131,13 +131,13 @@ brw_finalize_mipmap_tree(struct brw_context *brw, break; case GL_TEXTURE_3D: depth = depth << level; - /* Fall through */ + FALLTHROUGH; case GL_TEXTURE_2D: case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP_ARRAY: height = height << level; - /* Fall through */ + FALLTHROUGH; case GL_TEXTURE_1D: case GL_TEXTURE_1D_ARRAY: width = width << level; diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index ceaedfaea47..c7a78b0a36a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -263,7 +263,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx, } } } - /* 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/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index a9c01af0b81..777ab5d5837 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -424,7 +424,7 @@ brw_get_texture_swizzle(const struct gl_context *ctx, swizzles[3] = SWIZZLE_ONE; break; } - /* fallthrough */ + FALLTHROUGH; case GL_RG: case GL_RGB: if (_mesa_get_format_bits(img->TexFormat, GL_ALPHA_BITS) > 0 || diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 9258c0071c0..34b14ed70b2 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -672,9 +672,9 @@ genX(emit_vertices)(struct brw_context *brw) upload_format_size(upload_format) : glformat->Size; switch (size) { - case 0: comp0 = VFCOMP_STORE_0; /* fallthrough */ - case 1: comp1 = VFCOMP_STORE_0; /* fallthrough */ - case 2: comp2 = VFCOMP_STORE_0; /* fallthrough */ + case 0: comp0 = VFCOMP_STORE_0; FALLTHROUGH; + case 1: comp1 = VFCOMP_STORE_0; FALLTHROUGH; + case 2: comp2 = VFCOMP_STORE_0; FALLTHROUGH; case 3: if (GFX_VER >= 8 && glformat->Doubles) { comp3 = VFCOMP_STORE_0; diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c index 816f4e09dad..b5e387f3a68 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c @@ -220,7 +220,7 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit) switch (ti->_BaseFormat) { case GL_LUMINANCE: a = 0xff; - /* fallthrough */ + FALLTHROUGH; case GL_LUMINANCE_ALPHA: g = b = r; break; diff --git a/src/mesa/drivers/dri/r200/r200_fragshader.c b/src/mesa/drivers/dri/r200/r200_fragshader.c index eca4c814b5f..77ebc854be5 100644 --- a/src/mesa/drivers/dri/r200/r200_fragshader.c +++ b/src/mesa/drivers/dri/r200/r200_fragshader.c @@ -166,7 +166,7 @@ static void r200UpdateFSArith( struct gl_context *ctx ) case GL_SUB_ATI: /* negate C */ SET_INST(opnum, optype) |= R200_TXC_NEG_ARG_C; - /* fallthrough */ + FALLTHROUGH; case GL_ADD_ATI: r200SetFragShaderArg(afs_cmd, opnum, optype, inst->SrcReg[optype][0], 1, &tfactor); @@ -185,7 +185,7 @@ static void r200UpdateFSArith( struct gl_context *ctx ) case GL_MAD_ATI: r200SetFragShaderArg(afs_cmd, opnum, optype, inst->SrcReg[optype][2], 2, &tfactor); - /* fallthrough */ + FALLTHROUGH; case GL_MUL_ATI: r200SetFragShaderArg(afs_cmd, opnum, optype, inst->SrcReg[optype][0], 0, &tfactor); diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c index 7177488d087..717c2c3897d 100644 --- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c +++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c @@ -92,7 +92,7 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev ) switch (emitsize) { case 4: vfmt0 |= R200_VTX_W0; - /* fallthrough */ + FALLTHROUGH; case 3: vfmt0 |= R200_VTX_Z0; break; @@ -158,13 +158,12 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev ) switch (emitsize) { case 2: vfmt0 |= R200_VTX_XY1; - /* fallthrough */ + FALLTHROUGH; case 3: vfmt0 |= R200_VTX_Z1; - /* fallthrough */ + FALLTHROUGH; case 4: vfmt0 |= R200_VTX_W1; - /* fallthrough */ } break; default: diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c index eda0411da03..07e7d6e7ac8 100644 --- a/src/mesa/drivers/dri/r200/r200_swtcl.c +++ b/src/mesa/drivers/dri/r200/r200_swtcl.c @@ -324,9 +324,9 @@ static inline GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim) return ((!ctx->Point.SmoothFlag) ? R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS); case GL_LINES: - /* fallthrough */ + FALLTHROUGH; case GL_LINE_LOOP: - /* fallthrough */ + FALLTHROUGH; case GL_LINE_STRIP: return R200_VF_PRIM_LINES; default: diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index e80e57fb7c4..f8e45e12b63 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -492,7 +492,7 @@ static GLboolean r200UpdateTextureEnv( struct gl_context *ctx, int unit, int slo * 1.3) does. */ RGBshift = 0; - /* FALLTHROUGH */ + FALLTHROUGH; case GL_DOT3_RGB: case GL_DOT3_RGBA: diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c index fff6b8d2d05..d4079d60ade 100644 --- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c +++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c @@ -405,15 +405,15 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs ) switch (VB->AttribPtr[_TNL_ATTRIB_POS]->size) { case 1: _mesa_vector4f_clean_elem(&rmesa->tcl.ObjClean, VB->Count, 1); - /* fallthrough */ + FALLTHROUGH; case 2: _mesa_vector4f_clean_elem(&rmesa->tcl.ObjClean, VB->Count, 2); - /* fallthrough */ + FALLTHROUGH; case 3: if (setup_tab[i].vertex_format & RADEON_CP_VC_FRMT_W0) { _mesa_vector4f_clean_elem(&rmesa->tcl.ObjClean, VB->Count, 3); } - /* fallthrough */ + FALLTHROUGH; case 4: default: break; diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index d723522a1e5..660bb1a9fe5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -338,7 +338,7 @@ static void radeonFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *pa default: return; } - /* fallthrough */ + FALLTHROUGH; case GL_FOG_DENSITY: case GL_FOG_START: case GL_FOG_END: diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index 6f366d90517..ce0e5e1673d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -395,7 +395,7 @@ static GLboolean radeonUpdateTextureEnv( struct gl_context *ctx, int unit ) * 1.3) does. */ RGBshift = 0; - /* FALLTHROUGH */ + FALLTHROUGH; case GL_DOT3_RGB: case GL_DOT3_RGBA: diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index a7983a413a6..ce2e73f7bd8 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -662,13 +662,13 @@ xmesa_color_to_pixel(struct gl_context *ctx, case PF_8A8R8G8B: return PACK_8A8R8G8B( r, g, b, a ); case PF_8R8G8B: - /* fall through */ + FALLTHROUGH; case PF_8R8G8B24: return PACK_8R8G8B( r, g, b ); case PF_5R6G5B: return PACK_5R6G5B( r, g, b ); case PF_Dither_True: - /* fall through */ + FALLTHROUGH; case PF_Dither_5R6G5B: { unsigned long p; @@ -1582,7 +1582,7 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, case PF_5R6G5B: return PACK_5R6G5B( r, g, b ); case PF_Dither_5R6G5B: - /* fall through */ + FALLTHROUGH; case PF_Dither_True: { unsigned long p; diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index 4c5a59df490..1ceb1f60569 100644 --- a/src/mesa/main/condrender.c +++ b/src/mesa/main/condrender.c @@ -192,27 +192,27 @@ _mesa_check_conditional_render(struct gl_context *ctx) switch (ctx->Query.CondRenderMode) { case GL_QUERY_BY_REGION_WAIT: - /* fall-through */ + FALLTHROUGH; case GL_QUERY_WAIT: if (!q->Ready) { ctx->Driver.WaitQuery(ctx, q); } return q->Result > 0; case GL_QUERY_BY_REGION_WAIT_INVERTED: - /* fall-through */ + FALLTHROUGH; case GL_QUERY_WAIT_INVERTED: if (!q->Ready) { ctx->Driver.WaitQuery(ctx, q); } return q->Result == 0; case GL_QUERY_BY_REGION_NO_WAIT: - /* fall-through */ + FALLTHROUGH; case GL_QUERY_NO_WAIT: if (!q->Ready) ctx->Driver.CheckQuery(ctx, q); return q->Ready ? (q->Result > 0) : GL_TRUE; case GL_QUERY_BY_REGION_NO_WAIT_INVERTED: - /* fall-through */ + FALLTHROUGH; case GL_QUERY_NO_WAIT_INVERTED: if (!q->Ready) ctx->Driver.CheckQuery(ctx, q); diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 73e10c9ed16..96819fad68b 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -2470,7 +2470,7 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) return TYPE_INT; case GL_BLEND_SRC: - /* fall-through */ + FALLTHROUGH; case GL_BLEND_SRC_RGB: if (index >= ctx->Const.MaxDrawBuffers) goto invalid_value; @@ -2486,7 +2486,7 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) v->value_int = ctx->Color.Blend[index].SrcA; return TYPE_INT; case GL_BLEND_DST: - /* fall-through */ + FALLTHROUGH; case GL_BLEND_DST_RGB: if (index >= ctx->Const.MaxDrawBuffers) goto invalid_value; diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 57299f37d45..7ad147cbca9 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -92,7 +92,7 @@ shading_language_version(struct gl_context *ctx) return (const GLubyte *) 0; } case API_OPENGLES: - /* fall-through */ + FALLTHROUGH; default: _mesa_problem(ctx, "Unexpected API value in shading_language_version()"); diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 5aaae79a2c7..841e07f8a4c 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -981,7 +981,7 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) res = set_sampler_reduction_mode(ctx, sampObj, param); break; case GL_TEXTURE_BORDER_COLOR: - /* fall-through */ + FALLTHROUGH; default: res = INVALID_PNAME; } @@ -1067,7 +1067,7 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) res = set_sampler_reduction_mode(ctx, sampObj, (GLenum) param); break; case GL_TEXTURE_BORDER_COLOR: - /* fall-through */ + FALLTHROUGH; default: res = INVALID_PNAME; } diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index cb86fdd32c2..5e8515932aa 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -705,7 +705,7 @@ _mesa_program_resource_find_name(struct gl_shader_program *shProg, if (name[baselen] == '.') { return res; } - /* fall-through */ + FALLTHROUGH; case GL_PROGRAM_INPUT: case GL_PROGRAM_OUTPUT: if (name[baselen] == '\0') { @@ -1099,7 +1099,7 @@ program_resource_location(struct gl_program_resource *res, unsigned array_index) RESOURCE_UNI(res)->atomic_buffer_index != -1) return -1; - /* fallthrough */ + FALLTHROUGH; case GL_VERTEX_SUBROUTINE_UNIFORM: case GL_GEOMETRY_SUBROUTINE_UNIFORM: case GL_FRAGMENT_SUBROUTINE_UNIFORM: @@ -1491,7 +1491,7 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg, case GL_REFERENCED_BY_COMPUTE_SHADER: if (!_mesa_has_compute_shaders(ctx)) goto invalid_enum; - /* fallthrough */ + FALLTHROUGH; case GL_REFERENCED_BY_VERTEX_SHADER: case GL_REFERENCED_BY_TESS_CONTROL_SHADER: case GL_REFERENCED_BY_TESS_EVALUATION_SHADER: diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 8105c647db0..24275c7d947 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -576,7 +576,7 @@ _mesa_get_texture_dimensions(GLenum target) case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY: return 3; case GL_TEXTURE_BUFFER: - /* fall-through */ + FALLTHROUGH; default: _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()", target); diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 083a3104ead..4822cb9b772 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -631,7 +631,7 @@ _mesa_compute_version(struct gl_context *ctx) if (_mesa_is_desktop_gl(ctx)) { switch (ctx->Version) { case 20: - /* fall-through, GLSL 1.20 is the minimum we support */ + FALLTHROUGH; /* GLSL 1.20 is the minimum we support */ case 21: ctx->Const.GLSLVersion = 120; break; diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 1b7ad7f5b15..eaaf8daab1c 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2509,7 +2509,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx, case GLSL_TYPE_UINT64: if (storage->type->vector_elements > 2) dmul *= 2; - /* fallthrough */ + FALLTHROUGH; case GLSL_TYPE_UINT: case GLSL_TYPE_UINT16: case GLSL_TYPE_UINT8: @@ -2520,7 +2520,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx, case GLSL_TYPE_INT64: if (storage->type->vector_elements > 2) dmul *= 2; - /* fallthrough */ + FALLTHROUGH; case GLSL_TYPE_INT: case GLSL_TYPE_INT16: case GLSL_TYPE_INT8: @@ -2531,7 +2531,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx, case GLSL_TYPE_DOUBLE: if (storage->type->vector_elements > 2) dmul *= 2; - /* fallthrough */ + FALLTHROUGH; case GLSL_TYPE_FLOAT: case GLSL_TYPE_FLOAT16: format = uniform_native; diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 2ca71c52102..1e478667c64 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execute.c @@ -116,9 +116,9 @@ get_src_register_pointer(const struct prog_src_register *source, return machine->Outputs[reg]; case PROGRAM_STATE_VAR: - /* Fallthrough */ + FALLTHROUGH; case PROGRAM_CONSTANT: - /* Fallthrough */ + FALLTHROUGH; case PROGRAM_UNIFORM: { if (reg >= (GLint) prog->Parameters->NumParameters) return ZeroVec; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 96d92165ace..ad6608f794e 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1898,14 +1898,14 @@ glsl_to_tgsi_visitor::visit_expression(ir_expression* ir, st_src_reg *op) emit_asm(ir, TGSI_OPCODE_I2F, result_dst, op[0]); break; } - /* fallthrough to next case otherwise */ + FALLTHROUGH; case ir_unop_b2f: if (native_integers) { emit_asm(ir, TGSI_OPCODE_AND, result_dst, op[0], st_src_reg_for_float(1.0)); break; } - /* fallthrough to next case otherwise */ + FALLTHROUGH; case ir_unop_i2u: case ir_unop_u2i: case ir_unop_i642u64: @@ -2016,13 +2016,13 @@ glsl_to_tgsi_visitor::visit_expression(ir_expression* ir, st_src_reg *op) emit_asm(ir, TGSI_OPCODE_NOT, result_dst, op[0]); break; } - /* fallthrough */ + FALLTHROUGH; case ir_unop_u2f: if (native_integers) { emit_asm(ir, TGSI_OPCODE_U2F, result_dst, op[0]); break; } - /* fallthrough */ + FALLTHROUGH; case ir_binop_lshift: case ir_binop_rshift: if (native_integers) { @@ -2044,19 +2044,19 @@ glsl_to_tgsi_visitor::visit_expression(ir_expression* ir, st_src_reg *op) emit_asm(ir, opcode, result_dst, op[0], count); break; } - /* fallthrough */ + FALLTHROUGH; case ir_binop_bit_and: if (native_integers) { emit_asm(ir, TGSI_OPCODE_AND, result_dst, op[0], op[1]); break; } - /* fallthrough */ + FALLTHROUGH; case ir_binop_bit_xor: if (native_integers) { emit_asm(ir, TGSI_OPCODE_XOR, result_dst, op[0], op[1]); break; } - /* fallthrough */ + FALLTHROUGH; case ir_binop_bit_or: if (native_integers) { emit_asm(ir, TGSI_OPCODE_OR, result_dst, op[0], op[1]); @@ -3965,9 +3965,9 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir) coord.swizzle = SWIZZLE_XXXX; switch (type->coordinate_components()) { case 4: assert(!"unexpected coord count"); - /* fallthrough */ + FALLTHROUGH; case 3: coord.swizzle |= SWIZZLE_Z << 6; - /* fallthrough */ + FALLTHROUGH; case 2: coord.swizzle |= SWIZZLE_Y << 3; } @@ -5473,7 +5473,7 @@ glsl_to_tgsi_visitor::eliminate_dead_code(void) case TGSI_OPCODE_IF: case TGSI_OPCODE_UIF: ++level; - /* fallthrough to default case to mark the condition as read */ + FALLTHROUGH; /* to mark the condition as read */ default: /* Continuing the block, clear any channels from the write array that * are read by this instruction. diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp index 210c25e8ba8..32cde9fc329 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp @@ -1231,7 +1231,7 @@ get_temp_registers_required_live_ranges(void *mem_ctx, exec_list *instructions, assert(num_inst_src_regs(inst) == 1); access.record_read(inst->src[0], line, switch_scope); - /* Fall through to allocate the scope. */ + FALLTHROUGH; /* To allocate the scope. */ } case TGSI_OPCODE_DEFAULT: { prog_scope_type t = inst->op == TGSI_OPCODE_CASE ? switch_case_branch @@ -1424,4 +1424,4 @@ void dump_instruction(ostream& os, int line, prog_scope *scope, os << setw(indent * 4) << " "; os << inst << "\n"; } -#endif \ No newline at end of file +#endif diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 3510704ddf8..1327fb56f90 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -184,7 +184,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, break; default: assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()"); - /* fall-through */ + FALLTHROUGH; case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: *widthOut = widthIn; diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index b06e81533a6..fa4eb7afbae 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -139,7 +139,7 @@ _swrast_update_polygon( struct gl_context *ctx ) backface_sign = 1.0F; break; case GL_FRONT_AND_BACK: - /* fallthrough */ + FALLTHROUGH; default: backface_sign = 0.0F; } diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 44fc63ad3ef..3b17ba90d93 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -420,10 +420,10 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) /* impossible */ case 2: _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); - /* fall-through */ + FALLTHROUGH; case 3: _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); - /* fall-through */ + FALLTHROUGH; case 4: break; } diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 60c624d77a7..053900e0033 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -172,10 +172,10 @@ static GLboolean run_vertex_stage( struct gl_context *ctx, /* impossible */ case 2: _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); - /* fall-through */ + FALLTHROUGH; case 3: _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); - /* fall-through */ + FALLTHROUGH; case 4: break; } diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index e045081910a..c99b6da4566 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1618,7 +1618,7 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) case nir_op_fsub: s1 = bi_neg(s1); - /* fallthrough */ + FALLTHROUGH; case nir_op_fadd: bi_fadd_to(b, sz, dst, s0, s1, BI_ROUND_NONE); break; diff --git a/src/panfrost/bifrost/disassemble.c b/src/panfrost/bifrost/disassemble.c index 1e3c878f82b..3609d8fbf55 100644 --- a/src/panfrost/bifrost/disassemble.c +++ b/src/panfrost/bifrost/disassemble.c @@ -33,6 +33,7 @@ #include "bifrost.h" #include "disassemble.h" #include "bi_print_common.h" +#include "util/compiler.h" #include "util/macros.h" // return bits (high, lo] @@ -565,7 +566,7 @@ static bool dump_clause(FILE *fp, uint32_t *words, unsigned *size, unsigned offs /* Format 0 - followed by constants */ num_instrs = 1; done = stop; - /* fallthrough */ + FALLTHROUGH; case 0x5: /* Format 0 - followed by instructions */ header_bits = bits(words[2], 19, 32) | ((uint64_t) words[3] << (32 - 19)); diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c index 8e51fd1cc45..6443f72d4a7 100644 --- a/src/panfrost/lib/pan_blend.c +++ b/src/panfrost/lib/pan_blend.c @@ -245,7 +245,7 @@ to_panfrost_function(enum blend_func blend_func, break; case BLEND_FUNC_REVERSE_SUBTRACT: function->negate_b = true; - /* fall-through */ + FALLTHROUGH; case BLEND_FUNC_SUBTRACT: function->b = MALI_BLEND_OPERAND_B_SRC_MINUS_DEST; break; diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 7b8154bf616..e2a7d337ecf 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -40,6 +40,7 @@ #include "wayland-drm-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" +#include #include #include #include @@ -135,7 +136,7 @@ wsi_wl_display_add_wl_format(struct wsi_wl_display *display, case WL_DRM_FORMAT_XBGR8888: wsi_wl_display_add_vk_format(display, formats, VK_FORMAT_R8G8B8_UNORM); - /* fallthrough */ + FALLTHROUGH; case WL_DRM_FORMAT_ABGR8888: wsi_wl_display_add_vk_format(display, formats, VK_FORMAT_R8G8B8A8_UNORM); @@ -165,7 +166,7 @@ wsi_wl_display_add_wl_format(struct wsi_wl_display *display, VK_FORMAT_B8G8R8_SRGB); wsi_wl_display_add_vk_format(display, formats, VK_FORMAT_B8G8R8_UNORM); - /* fallthrough */ + FALLTHROUGH; case WL_DRM_FORMAT_ARGB8888: wsi_wl_display_add_vk_format(display, formats, VK_FORMAT_B8G8R8A8_SRGB);