if (id)
q = _mesa_lookup_query_object(ctx, id);
- if (!q || q->Active) {
+ if (!q || q->Active || !q->EverBound) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetQueryObjectivARB(id=%d is invalid or active)", id);
return;
if (id)
q = _mesa_lookup_query_object(ctx, id);
- if (!q || q->Active) {
+ if (!q || q->Active || !q->EverBound) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetQueryObjectuivARB(id=%d is invalid or active)", id);
return;
if (id)
q = _mesa_lookup_query_object(ctx, id);
- if (!q || q->Active) {
+ if (!q || q->Active || !q->EverBound) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetQueryObjectui64vARB(id=%d is invalid or active)", id);
return;
if (id)
q = _mesa_lookup_query_object(ctx, id);
- if (!q || q->Active) {
+ if (!q || q->Active || !q->EverBound) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetQueryObjectuui64vARB(id=%d is invalid or active)", id);
return;