mesa: add new query/buffer targets for transform feedback
authorBrian Paul <brianp@vmware.com>
Wed, 31 Mar 2010 01:53:01 +0000 (19:53 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Mar 2010 02:04:04 +0000 (20:04 -0600)
src/mesa/main/bufferobj.c
src/mesa/main/queryobj.c

index 11bf48622fd1b6d68e59d911100812b308a20dac..235cafcf1ed15579700d8047fe8f4beaaba99fdf 100644 (file)
@@ -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;
    }
index ff084d70c8e405c7a7138835679a2457dc7b7d4e..a907dac836b736202318825e0b5deedf04e37334 100644 (file)
@@ -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;
    }