[Mesa-dev] [PATCH 06/13] mesa: Allow glGet* queries on ARB_transform_feedback2 data in ES 3

Ian Romanick idr at freedesktop.org
Tue Dec 11 11:08:32 PST 2012


On 12/10/2012 02:28 PM, Matt Turner wrote:
> Fixes the transform_feedback2_init_defaults test from es3conform.
>
> The ES 3 spec lists these as TRANSFORM_FEEDBACK_PAUSED and
> TRANSFORM_FEEDBACK_ACTIVE.
> ---
>   src/mesa/main/get.c              |    8 +++++++-
>   src/mesa/main/get_hash_params.py |   10 +++++-----
>   2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> index 146612c..115d3c5 100644
> --- a/src/mesa/main/get.c
> +++ b/src/mesa/main/get.c
> @@ -289,6 +289,13 @@ static const int extra_texture_buffer_object[] = {
>      EXTRA_END
>   };
>
> +/* FIXME: Remove this when i965 exposes transform_feedback2 */

This comment should be removed.  These get enums are valid if either 
ARB_transformfeedback2 or ES3, so the check is correct.  XFB2 is a 
superset of ES3, so I don't think we should assume that every driver 
that implements ES3 also supports XFB2... even if they all happen to do so.

> +static const int extra_ARB_transform_feedback2_api_es3[] = {
> +   EXT(ARB_transform_feedback2),
> +   EXTRA_API_ES3,
> +   EXTRA_END
> +};
> +
>   static const int extra_ARB_uniform_buffer_object_and_geometry_shader[] = {
>      EXT(ARB_uniform_buffer_object),
>      EXT(ARB_geometry_shader4),
> @@ -321,7 +328,6 @@ EXTRA_EXT(ARB_seamless_cube_map);
>   EXTRA_EXT(ARB_sync);
>   EXTRA_EXT(ARB_vertex_shader);
>   EXTRA_EXT(EXT_transform_feedback);
> -EXTRA_EXT(ARB_transform_feedback2);
>   EXTRA_EXT(ARB_transform_feedback3);
>   EXTRA_EXT(EXT_pixel_buffer_object);
>   EXTRA_EXT(ARB_vertex_program);
> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
> index d9fa693..ffdf96a 100644
> --- a/src/mesa/main/get_hash_params.py
> +++ b/src/mesa/main/get_hash_params.py
> @@ -324,6 +324,11 @@ descriptor=[
>   # GL_ARB_sync
>     [ "MAX_SERVER_WAIT_TIMEOUT", "CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync" ],
>
> +# GL_ARB_transform_feedback2
> +  [ "TRANSFORM_FEEDBACK_BUFFER_PAUSED", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_ARB_transform_feedback2_api_es3" ],
> +  [ "TRANSFORM_FEEDBACK_BUFFER_ACTIVE", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_ARB_transform_feedback2_api_es3" ],
> +  [ "TRANSFORM_FEEDBACK_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_transform_feedback2_api_es3" ],
> +
>   # GL_ARB_uniform_buffer_object
>     [ "MAX_VERTEX_UNIFORM_BLOCKS", "CONTEXT_INT(Const.VertexProgram.MaxUniformBlocks), extra_ARB_uniform_buffer_object" ],
>     [ "MAX_FRAGMENT_UNIFORM_BLOCKS", "CONTEXT_INT(Const.FragmentProgram.MaxUniformBlocks), extra_ARB_uniform_buffer_object" ],
> @@ -621,11 +626,6 @@ descriptor=[
>   # GL_EXT_texture_integer
>     [ "RGBA_INTEGER_MODE_EXT", "BUFFER_BOOL(_IntegerColor), extra_EXT_texture_integer" ],
>
> -# GL_ARB_transform_feedback2
> -  [ "TRANSFORM_FEEDBACK_BUFFER_PAUSED", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_ARB_transform_feedback2" ],
> -  [ "TRANSFORM_FEEDBACK_BUFFER_ACTIVE", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_ARB_transform_feedback2" ],
> -  [ "TRANSFORM_FEEDBACK_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_transform_feedback2" ],
> -
>   # GL_ARB_transform_feedback3
>     [ "MAX_TRANSFORM_FEEDBACK_BUFFERS", "CONTEXT_INT(Const.MaxTransformFeedbackBuffers), extra_ARB_transform_feedback3" ],
>     [ "MAX_VERTEX_STREAMS", "CONTEXT_INT(Const.MaxVertexStreams), extra_ARB_transform_feedback3" ],
>



More information about the mesa-dev mailing list