[Mesa-dev,16/18] mesa: Include stream information in indexed queries.

Submitted by Iago Toral Quiroga on June 11, 2014, 7:49 a.m.

Details

Message ID 1402472981-22428-17-git-send-email-itoral@igalia.com
State Superseded
Headers show

Not browsing as part of any series.

Commit Message

Iago Toral Quiroga June 11, 2014, 7:49 a.m.
---
 src/mesa/main/context.c  | 2 +-
 src/mesa/main/mtypes.h   | 1 +
 src/mesa/main/queryobj.c | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8eb426d..82b00eb 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -660,7 +660,7 @@  _mesa_init_constants(struct gl_context *ctx)
    ctx->Const.MaxTransformFeedbackBuffers = MAX_FEEDBACK_BUFFERS;
    ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
    ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
-   ctx->Const.MaxVertexStreams = 1;
+   ctx->Const.MaxVertexStreams = MAX_VERTEX_STREAMS;
 
    /* GL 3.2  */
    ctx->Const.ProfileMask = ctx->API == API_OPENGL_CORE
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2519968..072d3ae 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2899,6 +2899,7 @@  struct gl_query_object
    GLboolean Active;   /**< inside Begin/EndQuery */
    GLboolean Ready;    /**< result is ready? */
    GLboolean EverBound;/**< has query object ever been bound */
+   GLuint Stream;      /**< The stream */
 };
 
 
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 86e7c3a..512f45a 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -367,6 +367,7 @@  _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
    q->Result = 0;
    q->Ready = GL_FALSE;
    q->EverBound = GL_TRUE;
+   q->Stream = index;
 
    /* XXX should probably refcount query objects */
    *bindpt = q;

Comments

On Wed, Jun 11, 2014 at 7:49 PM, Iago Toral Quiroga <itoral@igalia.com> wrote:
> ---
>  src/mesa/main/context.c  | 2 +-
>  src/mesa/main/mtypes.h   | 1 +
>  src/mesa/main/queryobj.c | 1 +
>  3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index 8eb426d..82b00eb 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -660,7 +660,7 @@ _mesa_init_constants(struct gl_context *ctx)
>     ctx->Const.MaxTransformFeedbackBuffers = MAX_FEEDBACK_BUFFERS;
>     ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
>     ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS;
> -   ctx->Const.MaxVertexStreams = 1;
> +   ctx->Const.MaxVertexStreams = MAX_VERTEX_STREAMS;

I don't think this is OK to just do globally. Drivers which expose
ARB_transform_feedback3 but not ARB_gpu_shader5 still need this to be
1.

>
>     /* GL 3.2  */
>     ctx->Const.ProfileMask = ctx->API == API_OPENGL_CORE
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 2519968..072d3ae 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2899,6 +2899,7 @@ struct gl_query_object
>     GLboolean Active;   /**< inside Begin/EndQuery */
>     GLboolean Ready;    /**< result is ready? */
>     GLboolean EverBound;/**< has query object ever been bound */
> +   GLuint Stream;      /**< The stream */
>  };
>
>
> diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
> index 86e7c3a..512f45a 100644
> --- a/src/mesa/main/queryobj.c
> +++ b/src/mesa/main/queryobj.c
> @@ -367,6 +367,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
>     q->Result = 0;
>     q->Ready = GL_FALSE;
>     q->EverBound = GL_TRUE;
> +   q->Stream = index;
>
>     /* XXX should probably refcount query objects */
>     *bindpt = q;
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev