glsl: Fix gl_shader_stage enum unsigned comparison
authorRob Herring <robh@kernel.org>
Thu, 1 Jun 2017 00:56:56 +0000 (19:56 -0500)
committerRob Herring <robh@kernel.org>
Thu, 8 Jun 2017 12:26:04 +0000 (07:26 -0500)
commitada3c3aa3da5d04bd597014dc1b5d4b028313513
tree17c7f2e142110692347e22daca5b8a95bb16f939
parent6150ea794b9589ea1aba1c672673cf096140364f
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 <nicolai.haehnle@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/builtin_variables.cpp
src/compiler/glsl/link_varyings.cpp
src/compiler/shader_enums.h
src/mesa/main/shaderobj.h
src/mesa/program/prog_print.c
src/mesa/state_tracker/st_context.h