From: Ian Romanick <ian.d.roman...@intel.com> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> --- src/mesa/main/version.c | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 5b8ac0a..7bf3f49 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -32,7 +32,7 @@ /** * Scans 'string' to see if it ends with 'ending'. */ -static GLboolean +static bool check_for_ending(const char *string, const char *ending) { int len1, len2; @@ -41,13 +41,13 @@ check_for_ending(const char *string, const char *ending) len2 = strlen(ending); if (len2 > len1) { - return GL_FALSE; + return false; } if (strcmp(string + (len1 - len2), ending) == 0) { - return GL_TRUE; + return true; } else { - return GL_FALSE; + return false; } } @@ -58,15 +58,15 @@ check_for_ending(const char *string, const char *ending) * fwd_context is only valid if version > 0 */ static void -get_gl_override(int *version, GLboolean *fwd_context, - GLboolean *compat_context) +get_gl_override(int *version, bool *fwd_context, + bool *compat_context) { const char *env_var = "MESA_GL_VERSION_OVERRIDE"; const char *version_str; int major, minor, n; static int override_version = -1; - static GLboolean fc_suffix = GL_FALSE; - static GLboolean compat_suffix = GL_FALSE; + static bool fc_suffix = false; + static bool compat_suffix = false; if (override_version < 0) { override_version = 0; @@ -134,7 +134,7 @@ _mesa_override_gl_version_contextless(struct gl_constants *consts, gl_api *apiOut, GLuint *versionOut) { int version; - GLboolean fwd_context, compat_context; + bool fwd_context, compat_context; get_gl_override(&version, &fwd_context, &compat_context); @@ -148,9 +148,9 @@ _mesa_override_gl_version_contextless(struct gl_constants *consts, } else { *apiOut = API_OPENGL_COMPAT; } - return GL_TRUE; + return true; } - return GL_FALSE; + return false; } void @@ -171,7 +171,7 @@ int _mesa_get_gl_version_override(void) { int version; - GLboolean fwd_context, compat_context; + bool fwd_context, compat_context; get_gl_override(&version, &fwd_context, &compat_context); @@ -211,11 +211,11 @@ compute_version(const struct gl_extensions *extensions, { GLuint major, minor, version; - const GLboolean ver_1_3 = (extensions->ARB_texture_border_clamp && + const bool ver_1_3 = (extensions->ARB_texture_border_clamp && extensions->ARB_texture_cube_map && extensions->ARB_texture_env_combine && extensions->ARB_texture_env_dot3); - const GLboolean ver_1_4 = (ver_1_3 && + const bool ver_1_4 = (ver_1_3 && extensions->ARB_depth_texture && extensions->ARB_shadow && extensions->ARB_texture_env_crossbar && @@ -223,9 +223,9 @@ compute_version(const struct gl_extensions *extensions, extensions->EXT_blend_func_separate && extensions->EXT_blend_minmax && extensions->EXT_point_parameters); - const GLboolean ver_1_5 = (ver_1_4 && + const bool ver_1_5 = (ver_1_4 && extensions->ARB_occlusion_query); - const GLboolean ver_2_0 = (ver_1_5 && + const bool ver_2_0 = (ver_1_5 && extensions->ARB_point_sprite && extensions->ARB_vertex_shader && extensions->ARB_fragment_shader && @@ -240,10 +240,10 @@ compute_version(const struct gl_extensions *extensions, */ (extensions->EXT_stencil_two_side || extensions->ATI_separate_stencil)); - const GLboolean ver_2_1 = (ver_2_0 && + const bool ver_2_1 = (ver_2_0 && extensions->EXT_pixel_buffer_object && extensions->EXT_texture_sRGB); - const GLboolean ver_3_0 = (ver_2_1 && + const bool ver_3_0 = (ver_2_1 && consts->GLSLVersion >= 130 && (consts->MaxSamples >= 4 || consts->FakeSWMSAA) && (api == API_OPENGL_CORE || @@ -263,7 +263,7 @@ compute_version(const struct gl_extensions *extensions, extensions->EXT_texture_shared_exponent && extensions->EXT_transform_feedback && extensions->NV_conditional_render); - const GLboolean ver_3_1 = (ver_3_0 && + const bool ver_3_1 = (ver_3_0 && consts->GLSLVersion >= 140 && extensions->ARB_draw_instanced && extensions->ARB_texture_buffer_object && @@ -272,7 +272,7 @@ compute_version(const struct gl_extensions *extensions, extensions->NV_primitive_restart && extensions->NV_texture_rectangle && consts->Program[MESA_SHADER_VERTEX].MaxTextureImageUnits >= 16); - const GLboolean ver_3_2 = (ver_3_1 && + const bool ver_3_2 = (ver_3_1 && consts->GLSLVersion >= 150 && extensions->ARB_depth_clamp && extensions->ARB_draw_elements_base_vertex && @@ -282,7 +282,7 @@ compute_version(const struct gl_extensions *extensions, extensions->ARB_sync && extensions->ARB_texture_multisample && extensions->EXT_vertex_array_bgra); - const GLboolean ver_3_3 = (ver_3_2 && + const bool ver_3_3 = (ver_3_2 && consts->GLSLVersion >= 330 && extensions->ARB_blend_func_extended && extensions->ARB_explicit_attrib_location && @@ -295,7 +295,7 @@ compute_version(const struct gl_extensions *extensions, extensions->EXT_texture_swizzle); /* ARB_sampler_objects is always enabled in mesa */ - const GLboolean ver_4_0 = (ver_3_3 && + const bool ver_4_0 = (ver_3_3 && consts->GLSLVersion >= 400 && extensions->ARB_draw_buffers_blend && extensions->ARB_draw_indirect && @@ -309,13 +309,13 @@ compute_version(const struct gl_extensions *extensions, extensions->ARB_texture_query_lod && extensions->ARB_transform_feedback2 && extensions->ARB_transform_feedback3); - const GLboolean ver_4_1 = (ver_4_0 && + const bool ver_4_1 = (ver_4_0 && consts->GLSLVersion >= 410 && extensions->ARB_ES2_compatibility && extensions->ARB_shader_precision && 0/*extensions->ARB_vertex_attrib_64bit*/ && extensions->ARB_viewport_array); - const GLboolean ver_4_2 = (ver_4_1 && + const bool ver_4_2 = (ver_4_1 && consts->GLSLVersion >= 420 && extensions->ARB_base_instance && extensions->ARB_conservative_depth && @@ -392,10 +392,10 @@ static GLuint compute_version_es1(const struct gl_extensions *extensions) { /* OpenGL ES 1.0 is derived from OpenGL 1.3 */ - const GLboolean ver_1_0 = (extensions->ARB_texture_env_combine && + const bool ver_1_0 = (extensions->ARB_texture_env_combine && extensions->ARB_texture_env_dot3); /* OpenGL ES 1.1 is derived from OpenGL 1.5 */ - const GLboolean ver_1_1 = (ver_1_0 && + const bool ver_1_1 = (ver_1_0 && extensions->EXT_point_parameters); if (ver_1_1) { @@ -411,7 +411,7 @@ static GLuint compute_version_es2(const struct gl_extensions *extensions) { /* OpenGL ES 2.0 is derived from OpenGL 2.0 */ - const GLboolean ver_2_0 = (extensions->ARB_texture_cube_map && + const bool ver_2_0 = (extensions->ARB_texture_cube_map && extensions->EXT_blend_color && extensions->EXT_blend_func_separate && extensions->EXT_blend_minmax && @@ -420,7 +420,7 @@ compute_version_es2(const struct gl_extensions *extensions) extensions->ARB_texture_non_power_of_two && extensions->EXT_blend_equation_separate); /* FINISHME: This list isn't quite right. */ - const GLboolean ver_3_0 = (extensions->ARB_half_float_vertex && + const bool ver_3_0 = (extensions->ARB_half_float_vertex && extensions->ARB_internalformat_query && extensions->ARB_map_buffer_range && extensions->ARB_shader_texture_lod && -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev