[Mesa-dev] [PATCH] gles2: Support for GL_EXT_occlusion_query_boolean

Harish Krupo harish.krupo.kps at intel.com
Mon Aug 21 04:52:37 UTC 2017


Hi Ilia,

On 08/18/2017 07:20 PM, Ilia Mirkin wrote:
> Why the static data changes? Also, I haven't double checked the code, 
> but I'm almost certain this is incomplete. You have to add code 
> disallowing the other enums from being used on es2.

Thank you for pointing out that code is required to disallow usage of 
other enums in gles2. When adding code to check for gles2 context I ran 
into an other issue. The issue was that when one requests mesa for a 
gles2 context, it actually returns a gles3.1 context. So if the code 
checks for an es2 context, it will return false and the enums will be 
allowed. Could you suggest a way out of this?

As for the static data changes, I wasn't exactly sure of the file's 
usage, I saw that the ARB versions of the functions were also present, 
so I added it there. If it is not required, I will remove it in the next 
version of the patch. Could you please explain why it is not needed?

Thank you

Regards
Harish Krupo

> 
> On Aug 18, 2017 6:42 AM, "Harish Krupo" <harish.krupo.kps at intel.com 
> <mailto:harish.krupo.kps at intel.com>> wrote:
> 
>     It passes
>     dEQP-GLES2.capability.extensions.other.GL_EXT_occlusion_query_boolean
>     test. I think the test is just a check for the existence of the
>     extension. On
>     gles3 and above, occlusion queries are part of the spec.
> 
>     Signed-off-by: Harish Krupo <harish.krupo.kps at intel.com
>     <mailto:harish.krupo.kps at intel.com>>
>     ---
> 
>     There is a piglit test for this extension in the piglit mailing list.
> 
>       src/mapi/glapi/gen/es_EXT.xml     | 60
>     +++++++++++++++++++++++++++++++++++++++
>       src/mapi/glapi/gen/static_data.py |  7 +++++
>       src/mesa/main/extensions_table.h  |  1 +
>       3 files changed, 68 insertions(+)
> 
>     diff --git a/src/mapi/glapi/gen/es_EXT.xml
>     b/src/mapi/glapi/gen/es_EXT.xml
>     index 3a2bdb2fdc..1730a92e93 100644
>     --- a/src/mapi/glapi/gen/es_EXT.xml
>     +++ b/src/mapi/glapi/gen/es_EXT.xml
>     @@ -751,6 +751,66 @@
>           </function>
>       </category>
> 
>     +<!-- 100. GL_EXT_occlusion_query_boolean -->
>     +<category name="GL_EXT_occlusion_query_boolean" number="29">
>     +    <enum name="CURRENT_QUERY_EXT"             count="1" 
>     value="0x8865">
>     +        <size name="GetQueryiv" mode="get"/>
>     +    </enum>
>     +    <enum name="QUERY_RESULT_EXT"              count="1" 
>     value="0x8866">
>     +        <size name="GetQueryObjectiv" mode="get"/>
>     +        <size name="GetQueryObjectuiv" mode="get"/>
>     +    </enum>
>     +    <enum name="QUERY_RESULT_AVAILABLE_EXT"    count="1" 
>     value="0x8867">
>     +        <size name="GetQueryObjectiv" mode="get"/>
>     +        <size name="GetQueryObjectuiv" mode="get"/>
>     +    </enum>
>     +
>     +    <enum name="ANY_SAMPLES_PASSED_EXT"                     
>       value="0x8C2F"/>
>     +    <enum name="ANY_SAMPLES_PASSED_CONSERVATIVE_EXT"         
>     value="0x8D6A"/>
>     +
>     +    <function name="GenQueriesEXT" alias="GenQueries">
>     +        <param name="n" type="GLsizei"/>
>     +        <param name="ids" type="GLuint *"/>
>     +    </function>
>     +
>     +    <function name="DeleteQueriesEXT" alias="DeleteQueries">
>     +        <param name="n" type="GLsizei"/>
>     +        <param name="ids" type="const GLuint *"/>
>     +    </function>
>     +
>     +    <function name="IsQueryEXT" alias="IsQuery">
>     +        <param name="id" type="GLuint"/>
>     +        <return type="GLboolean"/>
>     +    </function>
>     +
>     +    <function name="BeginQueryEXT" alias="BeginQuery">
>     +        <param name="target" type="GLenum"/>
>     +        <param name="id" type="GLuint"/>
>     +    </function>
>     +
>     +    <function name="EndQueryEXT" alias="EndQuery">
>     +        <param name="target" type="GLenum"/>
>     +    </function>
>     +
>     +    <function name="GetQueryivEXT" alias="GetQueryiv">
>     +        <param name="target" type="GLenum"/>
>     +        <param name="pname" type="GLenum"/>
>     +        <param name="params" type="GLint *"/>
>     +    </function>
>     +
>     +    <function name="GetQueryObjectivEXT" alias="GetQueryObjectiv">
>     +        <param name="id" type="GLuint"/>
>     +        <param name="pname" type="GLenum"/>
>     +        <param name="params" type="GLint *"/>
>     +    </function>
>     +
>     +    <function name="GetQueryObjectuivEXT" alias="GetQueryObjectuiv">
>     +        <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/mapi/glapi/gen/static_data.py
>     b/src/mapi/glapi/gen/static_data.py
>     index 7a8933b8d7..f5709604cc 100644
>     --- a/src/mapi/glapi/gen/static_data.py
>     +++ b/src/mapi/glapi/gen/static_data.py
>     @@ -452,6 +452,7 @@ functions = [
>           "BeginConditionalRenderNV",
>           "BeginQuery",
>           "BeginQueryARB",
>     +    "BeginQueryEXT",
>           "BeginQueryIndexed",
>           "BeginTransformFeedback",
>           "BindAttribLocation",
>     @@ -640,6 +641,7 @@ functions = [
>           "DeleteProgramsARB",
>           "DeleteQueries",
>           "DeleteQueriesARB",
>     +    "DeleteQueriesEXT",
>           "DeleteRenderbuffers",
>           "DeleteRenderbuffersEXT",
>           "DeleteSamplers",
>     @@ -710,6 +712,7 @@ functions = [
>           "EndList",
>           "EndQuery",
>           "EndQueryARB",
>     +    "EndQueryEXT",
>           "EndQueryIndexed",
>           "EndTransformFeedback",
>           "EvalCoord1d",
>     @@ -774,6 +777,7 @@ functions = [
>           "GenProgramsARB",
>           "GenQueries",
>           "GenQueriesARB",
>     +    "GenQueriesEXT",
>           "GenRenderbuffers",
>           "GenRenderbuffersEXT",
>           "GenSamplers",
>     @@ -904,10 +908,12 @@ functions = [
>           "GetQueryIndexediv",
>           "GetQueryiv",
>           "GetQueryivARB",
>     +    "GetQueryivEXT",
>           "GetQueryObjectiv",
>           "GetQueryObjectivARB",
>           "GetQueryObjectuiv",
>           "GetQueryObjectuivARB",
>     +    "GetQueryObjectuivEXT",
>           "GetRenderbufferParameteriv",
>           "GetRenderbufferParameterivEXT",
>           "GetSamplerParameterfv",
>     @@ -998,6 +1004,7 @@ functions = [
>           "IsProgramPipeline",
>           "IsQuery",
>           "IsQueryARB",
>     +    "IsQueryEXT",
>           "IsRenderbuffer",
>           "IsRenderbufferEXT",
>           "IsSampler",
>     diff --git a/src/mesa/main/extensions_table.h
>     b/src/mesa/main/extensions_table.h
>     index 347a6197ed..2e660ebae8 100644
>     --- a/src/mesa/main/extensions_table.h
>     +++ b/src/mesa/main/extensions_table.h
>     @@ -229,6 +229,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_query2 
>                       ,  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)
>     --
>     2.12.2
> 
>     _______________________________________________
>     mesa-dev mailing list
>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>     <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
> 


More information about the mesa-dev mailing list