diff options
author | Kenneth Graunke <[email protected]> | 2011-10-07 12:26:50 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-10-18 11:38:39 -0700 |
commit | 2e5a1a254ed81b1d3efa6064f48183eefac784d0 (patch) | |
tree | 0aba873855392f49ad3123c91f97ac2b3789a8eb /src/mesa/drivers/dri/i915/i830_vtbl.c | |
parent | 1b45d68c117d716adb488dcaac16e0834e2471ba (diff) |
intel: Convert from GLboolean to 'bool' from stdbool.h.
I initially produced the patch using this bash command:
for file in {intel,i915,i965}/*.{c,cpp,h}; do [ ! -h $file ] && sed -i
's/GLboolean/bool/g' $file && sed -i 's/GL_TRUE/true/g' $file && sed -i
's/GL_FALSE/false/g' $file; done
Then I manually added #include <stdbool.h> to fix compilation errors,
and converted a few functions back to GLboolean that were used in core
Mesa's function pointer table to avoid "incompatible pointer" warnings.
Finally, I cleaned up some whitespace issues introduced by the change.
Signed-off-by: Kenneth Graunke <[email protected]>
Acked-by: Chad Versace <[email protected]>
Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/i830_vtbl.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_vtbl.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index e8045e3691b..d29f9799a86 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -41,8 +41,8 @@ #define FILE_DEBUG_FLAG DEBUG_STATE -static GLboolean i830_check_vertex_size(struct intel_context *intel, - GLuint expected); +static bool i830_check_vertex_size(struct intel_context *intel, + GLuint expected); #define SZ_TO_HW(sz) ((sz-2)&0x3) #define EMIT_SZ(sz) (EMIT_1F + (sz) - 1) @@ -236,7 +236,7 @@ i830_reduced_primitive_state(struct intel_context *intel, GLenum rprim) /* Pull apart the vertex format registers and figure out how large a * vertex is supposed to be. */ -static GLboolean +static bool i830_check_vertex_size(struct intel_context *intel, GLuint expected) { struct i830_context *i830 = i830_context(&intel->ctx); @@ -783,34 +783,34 @@ i830_update_draw_buffer(struct intel_context *intel) } if (!colorRegions[0]) { - FALLBACK(intel, INTEL_FALLBACK_DRAW_BUFFER, GL_TRUE); + FALLBACK(intel, INTEL_FALLBACK_DRAW_BUFFER, true); } else { - FALLBACK(intel, INTEL_FALLBACK_DRAW_BUFFER, GL_FALSE); + FALLBACK(intel, INTEL_FALLBACK_DRAW_BUFFER, false); } /* Check for depth fallback. */ if (irbDepth && irbDepth->region) { - FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE); + FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, false); depthRegion = irbDepth->region; } else if (irbDepth && !irbDepth->region) { - FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_TRUE); + FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, true); depthRegion = NULL; } else { /* !irbDepth */ /* No fallback is needed because there is no depth buffer. */ - FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE); + FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, false); depthRegion = NULL; } /* Check for stencil fallback. */ if (irbStencil && irbStencil->region) { assert(irbStencil->Base.Format == MESA_FORMAT_S8_Z24); - FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, GL_FALSE); + FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false); } else if (irbStencil && !irbStencil->region) { - FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, GL_TRUE); + FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, true); } else { /* !irbStencil */ /* No fallback is needed because there is no stencil buffer. */ - FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, GL_FALSE); + FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false); } /* If we have a (packed) stencil buffer attached but no depth buffer, |