diff options
author | Rob Herring <[email protected]> | 2017-05-31 19:56:56 -0500 |
---|---|---|
committer | Rob Herring <[email protected]> | 2017-06-08 07:26:04 -0500 |
commit | ada3c3aa3da5d04bd597014dc1b5d4b028313513 (patch) | |
tree | 17c7f2e142110692347e22daca5b8a95bb16f939 /src/compiler/glsl/builtin_variables.cpp | |
parent | 6150ea794b9589ea1aba1c672673cf096140364f (diff) |
glsl: Fix gl_shader_stage enum unsigned comparison
Replace -1 with MESA_SHADER_NONE enum value to fix sign related warning:
external/mesa3d/src/compiler/glsl/link_varyings.cpp:1415:25: warning: comparison of constant -1 with expression of type 'gl_shader_stage' is always true [-Wtautological-constant-out-of-range-compare]
(consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) {
~~~~~~~~~~~~~~ ^ ~~
Reviewed-by: Nicolai Hähnle <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index ce4dd43730c..405502eb8a4 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1324,6 +1324,8 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type, case MESA_SHADER_COMPUTE: /* Compute shaders don't have varyings. */ break; + default: + break; } } @@ -1461,6 +1463,8 @@ _mesa_glsl_initialize_variables(exec_list *instructions, case MESA_SHADER_COMPUTE: gen.generate_cs_special_vars(); break; + default: + break; } } |