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/intel_tris.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/intel_tris.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tris.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index 0b7b0873aa7..eb7fb60eb6d 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -92,7 +92,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim) intel->vtbl.emit_state(intel); - intel->no_batch_wrap = GL_TRUE; + intel->no_batch_wrap = true; /*printf("%s *", __progname);*/ @@ -108,7 +108,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim) OUT_BATCH(0); ADVANCE_BATCH(); - intel->no_batch_wrap = GL_FALSE; + intel->no_batch_wrap = false; /* printf(">"); */ } @@ -232,7 +232,7 @@ void intel_flush_prim(struct intel_context *intel) * depends on the state just emitted. emit_state should be making sure we * have the space for this. */ - intel->no_batch_wrap = GL_TRUE; + intel->no_batch_wrap = true; #if 0 printf("emitting %d..%d=%d vertices size %d\n", offset, @@ -306,7 +306,7 @@ void intel_flush_prim(struct intel_context *intel) ADVANCE_BATCH(); } - intel->no_batch_wrap = GL_FALSE; + intel->no_batch_wrap = false; drm_intel_bo_unreference(vb_bo); } @@ -655,7 +655,7 @@ do { \ struct intel_context *intel = intel_context(ctx); \ GLuint color[n] = { 0, }, spec[n] = { 0, }; \ GLuint coloroffset = intel->coloroffset; \ - GLboolean specoffset = intel->specoffset; \ + bool specoffset = intel->specoffset; \ (void) color; (void) spec; (void) coloroffset; (void) specoffset; @@ -946,7 +946,7 @@ intelChooseRenderState(struct gl_context * ctx) struct intel_context *intel = intel_context(ctx); GLuint flags = ctx->_TriangleCaps; const struct gl_fragment_program *fprog = ctx->FragmentProgram._Current; - GLboolean have_wpos = (fprog && (fprog->Base.InputsRead & FRAG_BIT_WPOS)); + bool have_wpos = (fprog && (fprog->Base.InputsRead & FRAG_BIT_WPOS)); GLuint index = 0; if (INTEL_DEBUG & DEBUG_STATE) @@ -1211,7 +1211,7 @@ getFallbackString(GLuint bit) * \param bit one of INTEL_FALLBACK_x flags. */ void -intelFallback(struct intel_context *intel, GLbitfield bit, GLboolean mode) +intelFallback(struct intel_context *intel, GLbitfield bit, bool mode) { struct gl_context *ctx = &intel->ctx; TNLcontext *tnl = TNL_CONTEXT(ctx); |