summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_fp.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2011-10-07 12:26:50 -0700
committerKenneth Graunke <kenneth@whitecape.org>2011-10-18 11:38:39 -0700
commit2e5a1a254ed81b1d3efa6064f48183eefac784d0 (patch)
tree0aba873855392f49ad3123c91f97ac2b3789a8eb /src/mesa/drivers/dri/i965/brw_wm_fp.c
parent1b45d68c117d716adb488dcaac16e0834e2471ba (diff)
downloadexternal_mesa3d-2e5a1a254ed81b1d3efa6064f48183eefac784d0.zip
external_mesa3d-2e5a1a254ed81b1d3efa6064f48183eefac784d0.tar.gz
external_mesa3d-2e5a1a254ed81b1d3efa6064f48183eefac784d0.tar.bz2
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 <kenneth@whitecape.org> Acked-by: Chad Versace <chad@chad-versace.us> Acked-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_fp.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index bd46bd8..6c9a38e 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -104,7 +104,7 @@ static struct prog_src_register src_undef( void )
return src_reg(PROGRAM_UNDEFINED, 0);
}
-static GLboolean src_is_undef(struct prog_src_register src)
+static bool src_is_undef(struct prog_src_register src)
{
return src.File == PROGRAM_UNDEFINED;
}
@@ -766,7 +766,7 @@ static void precalc_tex( struct brw_wm_compile *c,
*/
if (c->key.yuvtex_mask & (1 << unit)) {
/* convert ycbcr to RGBA */
- GLboolean swap_uv = c->key.yuvtex_swap_mask & (1<<unit);
+ bool swap_uv = c->key.yuvtex_swap_mask & (1<<unit);
/*
CONST C0 = { -.5, -.0625, -.5, 1.164 }
@@ -882,11 +882,11 @@ static void precalc_tex( struct brw_wm_compile *c,
/**
* Check if the given TXP instruction really needs the divide-by-W step.
*/
-static GLboolean projtex( struct brw_wm_compile *c,
- const struct prog_instruction *inst )
+static bool
+projtex(struct brw_wm_compile *c, const struct prog_instruction *inst)
{
const struct prog_src_register src = inst->SrcReg[0];
- GLboolean retVal;
+ bool retVal;
assert(inst->Opcode == OPCODE_TXP);
@@ -898,13 +898,13 @@ static GLboolean projtex( struct brw_wm_compile *c,
* user-provided fragment programs anyway:
*/
if (inst->TexSrcTarget == TEXTURE_CUBE_INDEX)
- retVal = GL_FALSE; /* ut2004 gun rendering !?! */
+ retVal = false; /* ut2004 gun rendering !?! */
else if (src.File == PROGRAM_INPUT &&
GET_SWZ(src.Swizzle, W) == W &&
(c->key.proj_attrib_mask & (1 << src.Index)) == 0)
- retVal = GL_FALSE;
+ retVal = false;
else
- retVal = GL_TRUE;
+ retVal = true;
return retVal;
}
@@ -1051,7 +1051,7 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("pre-fp:\n");
_mesa_fprint_program_opt(stdout, &fp->program.Base, PROG_PRINT_DEBUG,
- GL_TRUE);
+ true);
printf("\n");
}
@@ -1124,7 +1124,7 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
case OPCODE_RSQ:
out = emit_scalar_insn(c, inst);
- out->SrcReg[0].Abs = GL_TRUE;
+ out->SrcReg[0].Abs = true;
break;
case OPCODE_TEX: