*/
if ((q->Target != GL_SAMPLES_PASSED &&
q->Target != GL_ANY_SAMPLES_PASSED &&
- q->Target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE) || q->Active) {
+ q->Target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE &&
+ q->Target != GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB &&
+ q->Target != GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB) || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
return;
}
return &ctx->Query.PrimitivesWritten[index];
else
return NULL;
+ case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB:
+ if (ctx->Extensions.ARB_transform_feedback_overflow_query)
+ return &ctx->Query.TransformFeedbackOverflow[index];
+ else
+ return NULL;
+ case GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB:
+ if (ctx->Extensions.ARB_transform_feedback_overflow_query)
+ return &ctx->Query.TransformFeedbackOverflowAny;
+ else
+ return NULL;
case GL_VERTICES_SUBMITTED_ARB:
case GL_PRIMITIVES_SUBMITTED_ARB:
case GL_TIMESTAMP:
case GL_PRIMITIVES_GENERATED:
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
+ case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB:
+ case GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB:
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glCreateQueries(invalid target = %s)",
switch (target) {
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
case GL_PRIMITIVES_GENERATED:
+ case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB:
if (index >= ctx->Const.MaxVertexStreams) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glBeginQueryIndexed(index>=MaxVertexStreams)");
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
*params = ctx->Const.QueryCounterBits.PrimitivesWritten;
break;
+ case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB:
+ case GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB:
+ /* The minimum value of this is 1 if it's nonzero, and the value
+ * is only ever GL_TRUE or GL_FALSE, so no sense in reporting more
+ * bits.
+ */
+ *params = 1;
+ break;
case GL_VERTICES_SUBMITTED_ARB:
*params = ctx->Const.QueryCounterBits.VerticesSubmitted;
break;
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
type = PIPE_QUERY_PRIMITIVES_EMITTED;
break;
+ case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB:
+ type = PIPE_QUERY_SO_OVERFLOW_PREDICATE;
+ break;
+ case GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB:
+ type = PIPE_QUERY_SO_OVERFLOW_PREDICATE;
+ break;
case GL_TIME_ELAPSED:
if (st->has_time_elapsed)
type = PIPE_QUERY_TIME_ELAPSED;