summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/i830_texstate.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/i915/i830_texstate.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/i915/i830_texstate.c')
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index 7fb4c70..5f32b92 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -113,7 +113,7 @@ translate_wrap_mode(GLenum wrap)
* efficient, but this has gotten complex enough that we need
* something which is understandable and reliable.
*/
-static GLboolean
+static bool
i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
{
struct gl_context *ctx = &intel->ctx;
@@ -138,7 +138,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
if (!intel_finalize_mipmap_tree(intel, unit))
- return GL_FALSE;
+ return false;
/* Get first image here, since intelObj->firstLevel will get set in
* the intel_finalize_mipmap_tree() call above.
@@ -221,7 +221,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
mipFilt = MIPFILTER_LINEAR;
break;
default:
- return GL_FALSE;
+ return false;
}
if (sampler->MaxAnisotropy > 1.0) {
@@ -237,7 +237,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
magFilt = FILTER_LINEAR;
break;
default:
- return GL_FALSE;
+ return false;
}
}
@@ -288,7 +288,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
/* 3D textures not available on i830
*/
if (tObj->Target == GL_TEXTURE_3D)
- return GL_FALSE;
+ return false;
state[I830_TEXREG_MCS] = (_3DSTATE_MAP_COORD_SET_CMD |
MAP_UNIT(unit) |
@@ -312,12 +312,12 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
border[1],
border[2]);
- I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(unit), GL_TRUE);
+ I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(unit), true);
/* memcmp was already disabled, but definitely won't work as the
* region might now change and that wouldn't be detected:
*/
I830_STATECHANGE(i830, I830_UPLOAD_TEX(unit));
- return GL_TRUE;
+ return true;
}
@@ -327,7 +327,7 @@ void
i830UpdateTextureState(struct intel_context *intel)
{
struct i830_context *i830 = i830_context(&intel->ctx);
- GLboolean ok = GL_TRUE;
+ bool ok = true;
GLuint i;
for (i = 0; i < I830_TEX_UNITS && ok; i++) {
@@ -343,7 +343,7 @@ i830UpdateTextureState(struct intel_context *intel)
case 0:{
struct i830_context *i830 = i830_context(&intel->ctx);
if (i830->state.active & I830_UPLOAD_TEX(i))
- I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(i), GL_FALSE);
+ I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(i), false);
if (i830->state.tex_buffer[i] != NULL) {
drm_intel_bo_unreference(i830->state.tex_buffer[i]);
@@ -353,7 +353,7 @@ i830UpdateTextureState(struct intel_context *intel)
}
case TEXTURE_3D_BIT:
default:
- ok = GL_FALSE;
+ ok = false;
break;
}
}