aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-03-18 14:21:15 +0000
committerJose Fonseca <[email protected]>2015-03-22 08:23:23 +0000
commitd01a7cdae576162791813c131027a6e675a4e6c7 (patch)
tree132e1880f8d48bbb14006d78c3891d7449e3b58b /src
parent7c7954b09dd28502aedb3eed312672620b9e6b7a (diff)
glsl: Avoid GLboolean vs bool arithmetic MSVC warnings.
Note that GLboolean is an alias for unsigned char, which lacks the implicit true/false semantics that C++/C99 bool have. Reviewed-by: Brian Paul <[email protected]> v2: Change gl_shader::IsES and gl_shader_program::IsES to be bool as recommended by Ian Romanick. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/linker.cpp5
-rw-r--r--src/mesa/main/mtypes.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 0c446777970..4349f0973b9 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2542,8 +2542,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
goto done;
}
- prog->ARB_fragment_coord_conventions_enable |=
- prog->Shaders[i]->ARB_fragment_coord_conventions_enable;
+ if (prog->Shaders[i]->ARB_fragment_coord_conventions_enable) {
+ prog->ARB_fragment_coord_conventions_enable = true;
+ }
gl_shader_stage shader_type = prog->Shaders[i]->Stage;
shader_list[shader_type][num_shaders[shader_type]] = prog->Shaders[i];
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1b4549415e0..8e1dba6f079 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2548,7 +2548,7 @@ struct gl_shader
GLchar *Label; /**< GL_KHR_debug */
GLboolean DeletePending;
GLboolean CompileStatus;
- GLboolean IsES; /**< True if this shader uses GLSL ES */
+ bool IsES; /**< True if this shader uses GLSL ES */
GLuint SourceChecksum; /**< for debug/logging purposes */
const GLchar *Source; /**< Source code string */
@@ -2924,7 +2924,7 @@ struct gl_shader_program
GLchar *InfoLog;
unsigned Version; /**< GLSL version used for linking */
- GLboolean IsES; /**< True if this program uses GLSL ES */
+ bool IsES; /**< True if this program uses GLSL ES */
/**
* Per-stage shaders resulting from the first stage of linking.