[Mesa-dev] [PATCH] Remove error when calling glGenQueries/glDeleteQueries while a query is active

Carl Worth cworth at cworth.org
Thu Oct 31 01:37:08 CET 2013


Kenneth Graunke <kenneth at whitecape.org> writes:
> Would you mind adding the "mesa: " prefix to the commit title?

I wouldn't mind at all. Thanks for the reminder. Only, I did happen to
push out that commit before I got your message. :-P

>> -            ASSERT(!q->Active); /* should be caught earlier */
>> +            if (q->Active) {
>> +               struct gl_query_object **bindpt;
>> +               bindpt = get_query_binding_point(ctx, q->Target);
>> +               assert(bindpt); /* Should be non-null for active q. */
>> +               if (bindpt) {
>> +                  *bindpt = NULL;
>> +               }
>> +               q->Active = GL_FALSE;
>> +               ctx->Driver.EndQuery(ctx, q);
>> +            }
>
> It might be a little friendlier to drivers to call EndQuery before
> unbinding it.  Though, i965 doesn't appear to care.

I was going to follow up with a commit that did that. (I wanted to be
extra careful before pulling this change over to the stable branch.)

But I just double-checked and the order of the code above does match the
order of the code in _mesa_endQueryIndexed. So all drivers (that work)
must already be expecting this.

So I believe the current state of the code is just fine.

> (Also...for some reason, this patch was really mangled and would not
> apply cleanly.  I had to hack the mbox file.)

What I did was start a reply in my email program, and then manually
inserted the text from "git format-patch". So in that process I must
have broken something that "git am" really wanted.

So I'll have to figure out a way to do that better, (manually passing a
message-id to "git send-email" seems far too fragile).

Thanks for letting me know that I botched this.

-Carl

-- 
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131030/2af28a23/attachment.pgp>


More information about the mesa-dev mailing list