Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kasting <pkasting@chromium.org>2021-06-30 19:17:59 +0300
committerPeter Kasting <pkasting@chromium.org>2021-06-30 19:17:59 +0300
commit7cdab07efe0117791837c6651dcfc199f25df975 (patch)
tree1d58f5efa51004d5ebf0f5a52b69ab146917e51e /spirv_glsl.cpp
parentc5b8022e615defe308865e52b312f38114b510b0 (diff)
Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
Diffstat (limited to 'spirv_glsl.cpp')
-rw-r--r--spirv_glsl.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp
index b47f0f36..1dac8267 100644
--- a/spirv_glsl.cpp
+++ b/spirv_glsl.cpp
@@ -8269,13 +8269,9 @@ string CompilerGLSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage)
}
return "gl_BaseVertex";
}
- else
- {
- // On regular GL, this is soft-enabled and we emit ifdefs in code.
- require_extension_internal("GL_ARB_shader_draw_parameters");
- return "SPIRV_Cross_BaseVertex";
- }
- break;
+ // On regular GL, this is soft-enabled and we emit ifdefs in code.
+ require_extension_internal("GL_ARB_shader_draw_parameters");
+ return "SPIRV_Cross_BaseVertex";
case BuiltInBaseInstance:
if (options.es)
@@ -8290,13 +8286,9 @@ string CompilerGLSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage)
}
return "gl_BaseInstance";
}
- else
- {
- // On regular GL, this is soft-enabled and we emit ifdefs in code.
- require_extension_internal("GL_ARB_shader_draw_parameters");
- return "SPIRV_Cross_BaseInstance";
- }
- break;
+ // On regular GL, this is soft-enabled and we emit ifdefs in code.
+ require_extension_internal("GL_ARB_shader_draw_parameters");
+ return "SPIRV_Cross_BaseInstance";
case BuiltInDrawIndex:
if (options.es)
@@ -8311,13 +8303,9 @@ string CompilerGLSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage)
}
return "gl_DrawID";
}
- else
- {
- // On regular GL, this is soft-enabled and we emit ifdefs in code.
- require_extension_internal("GL_ARB_shader_draw_parameters");
- return "gl_DrawIDARB";
- }
- break;
+ // On regular GL, this is soft-enabled and we emit ifdefs in code.
+ require_extension_internal("GL_ARB_shader_draw_parameters");
+ return "gl_DrawIDARB";
case BuiltInSampleId:
if (options.es && options.version < 320)