Commit 1fb192d5 authored by Jesse Natalie's avatar Jesse Natalie Committed by Marge Bot

d3d12: Fix implicit fallthrough warnings

Changes comments to use FALLTHROUGH macro, to silence warnings
from both GCC and clang.
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!8248>
parent 54dd7b1d
......@@ -915,7 +915,7 @@ get_prev_shader(struct d3d12_context *ctx, pipe_shader_type current)
case PIPE_SHADER_FRAGMENT:
if (ctx->gfx_stages[PIPE_SHADER_GEOMETRY])
return ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
/* fallthrough */
FALLTHROUGH;
case PIPE_SHADER_GEOMETRY:
return ctx->gfx_stages[PIPE_SHADER_VERTEX];
default:
......@@ -932,7 +932,7 @@ get_next_shader(struct d3d12_context *ctx, pipe_shader_type current)
case PIPE_SHADER_VERTEX:
if (ctx->gfx_stages[PIPE_SHADER_GEOMETRY])
return ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
/* fallthrough */
FALLTHROUGH;
case PIPE_SHADER_GEOMETRY:
return ctx->gfx_stages[PIPE_SHADER_FRAGMENT];
case PIPE_SHADER_FRAGMENT:
......@@ -963,7 +963,7 @@ scan_texture_use(nir_shader *nir)
case nir_texop_txd:
if (tex->is_shadow)
result |= TEX_CMP_WITH_LOD_BIAS_GRAD;
/* fallthrough */
FALLTHROUGH;
case nir_texop_tex:
if (tex->dest_type & (nir_type_int | nir_type_uint))
result |= TEX_SAMPLE_INTEGER_TEXTURE;
......
......@@ -26,6 +26,7 @@
#include "pipe/p_format.h"
#include "util/format/u_format.h"
#include "util/u_math.h"
#include "util/compiler.h"
static const DXGI_FORMAT formats[PIPE_FORMAT_COUNT] = {
#define MAP_FORMAT_NORM(FMT) \
......@@ -180,7 +181,7 @@ d3d12_get_resource_srv_format(enum pipe_format f, enum pipe_texture_target targe
case PIPE_FORMAT_A8_UNORM:
if (target == PIPE_BUFFER)
return DXGI_FORMAT_R8_UNORM; /* A8_UNORM is not supported for buffer SRV */
/* passthrough */
FALLTHROUGH;
default:
return d3d12_get_format(f);
}
......
......@@ -64,7 +64,7 @@ get_semantic_name(int slot, unsigned *index)
case VARYING_SLOT_CLIP_DIST1:
*index = 1;
/* fallthrough */
FALLTHROUGH;
case VARYING_SLOT_CLIP_DIST0:
return "SV_ClipDistance";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment