summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/i915_context.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/i915_context.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/i915_context.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index e807281..ca03ad0 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -91,7 +91,7 @@ i915InitDriverFunctions(struct dd_function_table *functions)
extern const struct tnl_pipeline_stage *intel_pipeline[];
-GLboolean
+bool
i915CreateContext(int api,
const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
@@ -103,7 +103,7 @@ i915CreateContext(int api,
struct gl_context *ctx = &intel->ctx;
if (!i915)
- return GL_FALSE;
+ return false;
i915InitVtbl(i915);
@@ -112,7 +112,7 @@ i915CreateContext(int api,
if (!intelInitContext(intel, api, mesaVis, driContextPriv,
sharedContextPrivate, &functions)) {
FREE(i915);
- return GL_FALSE;
+ return false;
}
_math_matrix_ctr(&intel->ViewportMatrix);
@@ -180,23 +180,23 @@ i915CreateContext(int api,
ctx->Const.FragmentProgram.LowInt = ctx->Const.FragmentProgram.HighInt =
ctx->Const.FragmentProgram.MediumInt;
- ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ ctx->FragmentProgram._MaintainTexEnvProgram = true;
/* FINISHME: Are there other options that should be enabled for software
* FINISHME: vertex shaders?
*/
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitCondCodes = GL_TRUE;
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitCondCodes = true;
struct gl_shader_compiler_options *const fs_options =
& ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
fs_options->MaxIfDepth = 0;
- fs_options->EmitNoNoise = GL_TRUE;
- fs_options->EmitNoPow = GL_TRUE;
- fs_options->EmitNoMainReturn = GL_TRUE;
- fs_options->EmitNoIndirectInput = GL_TRUE;
- fs_options->EmitNoIndirectOutput = GL_TRUE;
- fs_options->EmitNoIndirectUniform = GL_TRUE;
- fs_options->EmitNoIndirectTemp = GL_TRUE;
+ fs_options->EmitNoNoise = true;
+ fs_options->EmitNoPow = true;
+ fs_options->EmitNoMainReturn = true;
+ fs_options->EmitNoIndirectInput = true;
+ fs_options->EmitNoIndirectOutput = true;
+ fs_options->EmitNoIndirectUniform = true;
+ fs_options->EmitNoIndirectTemp = true;
ctx->Const.MaxDrawBuffers = 1;
@@ -213,5 +213,5 @@ i915CreateContext(int api,
_tnl_allow_vertex_fog(ctx, 0);
_tnl_allow_pixel_fog(ctx, 1);
- return GL_TRUE;
+ return true;
}