summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2017-05-31 19:56:56 -0500
committerRob Herring <[email protected]>2017-06-08 07:26:04 -0500
commitada3c3aa3da5d04bd597014dc1b5d4b028313513 (patch)
tree17c7f2e142110692347e22daca5b8a95bb16f939 /src/mesa/main
parent6150ea794b9589ea1aba1c672673cf096140364f (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/mesa/main')
-rw-r--r--src/mesa/main/shaderobj.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index b7dae62bcb4..97b8ce7ac23 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -216,6 +216,8 @@ _mesa_shader_stage_to_subroutine(gl_shader_stage stage)
return GL_TESS_CONTROL_SUBROUTINE;
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE;
+ case MESA_SHADER_NONE:
+ break;
}
unreachable("not reached");
}
@@ -236,6 +238,8 @@ _mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage)
return GL_TESS_CONTROL_SUBROUTINE_UNIFORM;
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM;
+ case MESA_SHADER_NONE:
+ break;
}
unreachable("not reached");
}