diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/extensions.c | 6 | ||||
-rw-r--r-- | src/mesa/main/formats.c | 1 | ||||
-rw-r--r-- | src/mesa/main/queryobj.c | 39 |
3 files changed, 32 insertions, 14 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index b71afdd61f3..fd5b4e915cd 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -249,7 +249,8 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) #if FEATURE_ARB_framebuffer_object ctx->Extensions.ARB_framebuffer_object = GL_TRUE; #endif -#if FEATURE_ARB_geometry_shader4 +#if FEATURE_ARB_geometry_shader4 && 0 + /* XXX re-enable when GLSL compiler again supports geometry shaders */ ctx->Extensions.ARB_geometry_shader4 = GL_TRUE; #endif ctx->Extensions.ARB_half_float_pixel = GL_TRUE; @@ -258,6 +259,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.ARB_multitexture = GL_TRUE; #if FEATURE_queryobj ctx->Extensions.ARB_occlusion_query = GL_TRUE; + ctx->Extensions.ARB_occlusion_query2 = GL_TRUE; #endif ctx->Extensions.ARB_point_sprite = GL_TRUE; #if FEATURE_ARB_shader_objects @@ -857,8 +859,6 @@ make_extension_string_es2(const struct gl_context *ctx, GLubyte *str) { size_t len = 0; - len += append_extension(&str, "GL_OES_compressed_paletted_texture"); - if (ctx->Extensions.ARB_framebuffer_object) { len += append_extension(&str, "GL_OES_depth24"); len += append_extension(&str, "GL_OES_depth32"); diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index cd9eb81852f..42f70ca232b 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -863,7 +863,6 @@ const char * _mesa_get_format_name(gl_format format) { const struct gl_format_info *info = _mesa_get_format_info(format); - ASSERT(info->BytesPerBlock); return info->StrName; } diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 88743977206..66fb5980589 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -143,6 +143,11 @@ get_query_binding_point(struct gl_context *ctx, GLenum target) return &ctx->Query.CurrentOcclusionObject; else return NULL; + case GL_ANY_SAMPLES_PASSED: + if (ctx->Extensions.ARB_occlusion_query2) + return &ctx->Query.CurrentOcclusionObject; + else + return NULL; case GL_TIME_ELAPSED_EXT: if (ctx->Extensions.EXT_timer_query) return &ctx->Query.CurrentTimerObject; @@ -378,11 +383,18 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params) if (!q->Ready) ctx->Driver.WaitQuery(ctx, q); /* if result is too large for returned type, clamp to max value */ - if (q->Result > 0x7fffffff) { - *params = 0x7fffffff; - } - else { - *params = (GLint)q->Result; + if (q->Target == GL_ANY_SAMPLES_PASSED) { + if (q->Result) + *params = GL_TRUE; + else + *params = GL_FALSE; + } else { + if (q->Result > 0x7fffffff) { + *params = 0x7fffffff; + } + else { + *params = (GLint)q->Result; + } } break; case GL_QUERY_RESULT_AVAILABLE_ARB: @@ -418,11 +430,18 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params) if (!q->Ready) ctx->Driver.WaitQuery(ctx, q); /* if result is too large for returned type, clamp to max value */ - if (q->Result > 0xffffffff) { - *params = 0xffffffff; - } - else { - *params = (GLuint)q->Result; + if (q->Target == GL_ANY_SAMPLES_PASSED) { + if (q->Result) + *params = GL_TRUE; + else + *params = GL_FALSE; + } else { + if (q->Result > 0xffffffff) { + *params = 0xffffffff; + } + else { + *params = (GLuint)q->Result; + } } break; case GL_QUERY_RESULT_AVAILABLE_ARB: |