[Mesa-dev] [PATCH 2/2] gles2: support for GL_EXT_occlusion_query_boolean
Tapani Pälli
tapani.palli at intel.com
Wed Oct 4 11:56:28 UTC 2017
From: Harish Krupo <harish.krupo.kps at intel.com>
Following test checking entrypoints passes:
dEQP-EGL.functional.get_proc_address.extension.gl_ext_occlusion_query_boolean
Piglit test 'ext_occlusion_query_boolean-any-samples' passes with these changes.
No changes/regression observed in WebGL occlusion tests or Intel CI.
v2: add es2="2.0" for glapi entrypoints, clean up xml
dispatch_sanity changes (fix 'make check')
Signed-off-by: Harish Krupo <harish.krupo.kps at intel.com>
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mapi/glapi/gen/es_EXT.xml | 51 +++++++++++++++++++++++++++++++++
src/mesa/main/extensions_table.h | 1 +
src/mesa/main/tests/dispatch_sanity.cpp | 31 +++++++++++++++-----
3 files changed, 76 insertions(+), 7 deletions(-)
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index 3a2bdb2fdc..a09ff969c6 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -751,6 +751,57 @@
</function>
</category>
+<!-- 100. GL_EXT_occlusion_query_boolean -->
+<category name="GL_EXT_occlusion_query_boolean" number="29">
+ <enum name="CURRENT_QUERY_EXT" value="0x8865"/>
+ <enum name="QUERY_RESULT_EXT" value="0x8866"/>
+ <enum name="QUERY_RESULT_AVAILABLE_EXT" value="0x8867"/>
+ <enum name="ANY_SAMPLES_PASSED_EXT" value="0x8C2F"/>
+ <enum name="ANY_SAMPLES_PASSED_CONSERVATIVE_EXT" value="0x8D6A"/>
+
+ <function name="GenQueriesEXT" alias="GenQueries" es2="2.0">
+ <param name="n" type="GLsizei"/>
+ <param name="ids" type="GLuint *"/>
+ </function>
+
+ <function name="DeleteQueriesEXT" alias="DeleteQueries" es2="2.0">
+ <param name="n" type="GLsizei"/>
+ <param name="ids" type="const GLuint *"/>
+ </function>
+
+ <function name="IsQueryEXT" alias="IsQuery" es2="2.0">
+ <param name="id" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="BeginQueryEXT" alias="BeginQuery" es2="2.0">
+ <param name="target" type="GLenum"/>
+ <param name="id" type="GLuint"/>
+ </function>
+
+ <function name="EndQueryEXT" alias="EndQuery" es2="2.0">
+ <param name="target" type="GLenum"/>
+ </function>
+
+ <function name="GetQueryivEXT" alias="GetQueryiv" es2="2.0">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ </function>
+
+ <function name="GetQueryObjectivEXT" alias="GetQueryObjectiv" es2="2.0">
+ <param name="id" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ </function>
+
+ <function name="GetQueryObjectuivEXT" alias="GetQueryObjectuiv" es2="2.0">
+ <param name="id" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLuint *"/>
+ </function>
+</category>
+
<!-- 103. GL_EXT_texture_rg -->
<category name="GL_EXT_texture_rg" number="103">
<enum name="RED_EXT" value="0x1903"/>
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 9475c1b69d..4ab28be1f8 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -231,6 +231,7 @@ EXT(EXT_map_buffer_range , ARB_map_buffer_range
EXT(EXT_memory_object , EXT_memory_object , GLL, GLC, x , ES2, 2017)
EXT(EXT_memory_object_fd , EXT_memory_object_fd , GLL, GLC, x , ES2, 2017)
EXT(EXT_multi_draw_arrays , dummy_true , GLL, x , ES1, ES2, 1999)
+EXT(EXT_occlusion_query_boolean , ARB_occlusion_query , x , x , x , ES2, 2001)
EXT(EXT_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2005)
EXT(EXT_packed_float , EXT_packed_float , GLL, GLC, x , x , 2004)
EXT(EXT_packed_pixels , dummy_true , GLL, x , x , x , 1997)
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index aea9ffb37f..8c511805b5 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -2424,11 +2424,22 @@ const struct function gles2_functions_possible[] = {
/* GL_KHR_blend_equation_advanced */
{ "glBlendBarrierKHR", 20, -1 },
+ /* GL_EXT_occlusion_query_boolean */
+ { "glGenQueriesEXT", 20, -1 },
+ { "glDeleteQueriesEXT", 20, -1 },
+ { "glIsQueryEXT", 20, -1 },
+ { "glBeginQueryEXT", 20, -1 },
+ { "glEndQueryEXT", 20, -1 },
+ { "glGetQueryivEXT", 20, -1 },
+ { "glGetQueryObjectivEXT", 20, -1 },
+ { "glGetQueryObjectuivEXT", 20, -1 },
+
{ NULL, 0, -1 }
};
const struct function gles3_functions_possible[] = {
- { "glBeginQuery", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glBeginQuery", 30, -1 },
{ "glBeginTransformFeedback", 30, -1 },
{ "glBindBufferBase", 30, -1 },
{ "glBindBufferRange", 30, -1 },
@@ -2449,7 +2460,8 @@ const struct function gles3_functions_possible[] = {
{ "glCopyBufferSubData", 30, -1 },
// We check for the aliased -OES version in GLES 2
// { "glCopyTexSubImage3D", 30, -1 },
- { "glDeleteQueries", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glDeleteQueries", 30, -1 },
{ "glDeleteSamplers", 30, -1 },
{ "glDeleteSync", 30, -1 },
{ "glDeleteTransformFeedbacks", 30, -1 },
@@ -2460,13 +2472,15 @@ const struct function gles3_functions_possible[] = {
// { "glDrawBuffers", 30, -1 },
{ "glDrawElementsInstanced", 30, -1 },
{ "glDrawRangeElements", 30, -1 },
- { "glEndQuery", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glEndQuery", 30, -1 },
{ "glEndTransformFeedback", 30, -1 },
{ "glFenceSync", 30, -1 },
// We check for the aliased -EXT version in GLES 2
// { "glFlushMappedBufferRange", 30, -1 },
{ "glFramebufferTextureLayer", 30, -1 },
- { "glGenQueries", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glGenQueries", 30, -1 },
{ "glGenSamplers", 30, -1 },
{ "glGenTransformFeedbacks", 30, -1 },
// We check for the aliased -OES version in GLES 2
@@ -2484,8 +2498,10 @@ const struct function gles3_functions_possible[] = {
{ "glGetInternalformativ", 30, -1 },
{ "glGetInternalformati64v", 30, -1 },
// glGetProgramBinary aliases glGetProgramBinaryOES in GLES 2
- { "glGetQueryiv", 30, -1 },
- { "glGetQueryObjectuiv", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glGetQueryiv", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glGetQueryObjectuiv", 30, -1 },
{ "glGetSamplerParameterfv", 30, -1 },
{ "glGetSamplerParameteriv", 30, -1 },
{ "glGetStringi", 30, -1 },
@@ -2498,7 +2514,8 @@ const struct function gles3_functions_possible[] = {
{ "glGetVertexAttribIuiv", 30, -1 },
{ "glInvalidateFramebuffer", 30, -1 },
{ "glInvalidateSubFramebuffer", 30, -1 },
- { "glIsQuery", 30, -1 },
+ // We check for the aliased -EXT version in GLES 2
+ // { "glIsQuery", 30, -1 },
{ "glIsSampler", 30, -1 },
{ "glIsSync", 30, -1 },
{ "glIsTransformFeedback", 30, -1 },
--
2.13.5
More information about the mesa-dev
mailing list