gallium: update fallthrough comments
clang doesn't support /* fallthrough */ so switch to fallthrough attribute. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "util/compiler.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_debug_describe.h"
|
||||
#include "util/u_debug_refcnt.h"
|
||||
@@ -708,7 +709,7 @@ util_max_layer(const struct pipe_resource *r, unsigned level)
|
||||
return u_minify(r->depth0, level) - 1;
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
assert(r->array_size == 6);
|
||||
/* fall-through */
|
||||
FALLTHROUGH;
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
|
||||
#include "pipe/p_defines.h"
|
||||
#include "util/compiler.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -277,7 +278,7 @@ u_reduced_prims_for_vertices(enum pipe_prim_type primitive, int vertices)
|
||||
return u_decomposed_prims_for_vertices(primitive, vertices) * 2;
|
||||
case PIPE_PRIM_POLYGON:
|
||||
primitive = PIPE_PRIM_TRIANGLE_FAN;
|
||||
/* fall through */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return u_decomposed_prims_for_vertices(primitive, vertices);
|
||||
}
|
||||
|
@@ -817,6 +817,7 @@ static inline unsigned radeon_flags_from_heap(enum radeon_heap heap)
|
||||
case RADEON_HEAP_GTT_UNCACHED_WC_READ_ONLY_32BIT:
|
||||
case RADEON_HEAP_GTT_UNCACHED_WC_32BIT:
|
||||
flags |= RADEON_FLAG_32BIT;
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ static int amdgpu_surface_sanity(const struct pipe_resource *tex)
|
||||
case PIPE_TEXTURE_1D:
|
||||
if (tex->height0 > 1)
|
||||
return -EINVAL;
|
||||
/* fall through */
|
||||
FALLTHROUGH;
|
||||
case PIPE_TEXTURE_2D:
|
||||
case PIPE_TEXTURE_RECT:
|
||||
if (tex->depth0 > 1 || tex->array_size > 1)
|
||||
@@ -47,7 +47,7 @@ static int amdgpu_surface_sanity(const struct pipe_resource *tex)
|
||||
case PIPE_TEXTURE_1D_ARRAY:
|
||||
if (tex->height0 > 1)
|
||||
return -EINVAL;
|
||||
/* fall through */
|
||||
FALLTHROUGH;
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
|
Reference in New Issue
Block a user