From: Brian Paul Date: Wed, 31 Mar 2010 01:53:01 +0000 (-0600) Subject: mesa: add new query/buffer targets for transform feedback X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=423860ac7809173dda479991f23751ad169076d1;p=mesa.git mesa: add new query/buffer targets for transform feedback --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 11bf48622fd..235cafcf1ed 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -83,6 +83,13 @@ get_buffer_target(GLcontext *ctx, GLenum target) return &ctx->CopyWriteBuffer; } break; +#if FEATURE_EXT_transform_feedback + case GL_TRANSFORM_FEEDBACK_BUFFER: + if (ctx->Extensions.EXT_transform_feedback) { + return &ctx->TransformFeedback.CurrentBuffer; + } + break; +#endif default: return NULL; } diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index ff084d70c8e..a907dac836b 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -148,6 +148,18 @@ get_query_binding_point(GLcontext *ctx, GLenum target) return &ctx->Query.CurrentTimerObject; else return NULL; +#if FEATURE_EXT_transform_feedback + case GL_PRIMITIVES_GENERATED: + if (ctx->Extensions.EXT_transform_feedback) + return &ctx->Query.PrimitivesGenerated; + else + return NULL; + case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: + if (ctx->Extensions.EXT_transform_feedback) + return &ctx->Query.PrimitivesWritten; + else + return NULL; +#endif default: return NULL; }