summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2021-04-10 17:11:58 +0200
committerMarge Bot <eric+marge@anholt.net>2021-04-15 16:01:22 +0000
commit2928c21eb73b66d22d1f383abf62de583547f81f (patch)
tree2d4b83a6af1534c1e5cbec8fe9103ca634215d88 /src/mesa/main
parent96f0f46350715860ece0f2233a73eccf95ffba57 (diff)
Convert most remaining free-form fall-through comments to FALLTHROUGH
One exception is src/amd/addrlib/, for which -Wimplicit-fallthrough is explicitly disabled. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10220>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/condrender.c8
-rw-r--r--src/mesa/main/get.c4
-rw-r--r--src/mesa/main/getstring.c2
-rw-r--r--src/mesa/main/samplerobj.c4
-rw-r--r--src/mesa/main/shader_query.cpp6
-rw-r--r--src/mesa/main/teximage.c2
-rw-r--r--src/mesa/main/version.c2
7 files changed, 14 insertions, 14 deletions
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;