Khronos Public Bugzilla
Bug 262 - Beginning a query with unused query name
Beginning a query with unused query name
Status: RESOLVED INVALID
Product: OpenGL
Classification: Unclassified
Component: API Specification
3.2
PC Windows
: P3 normal
: ---
Assigned To: Jon Leech
http://www.opengl.org/registry/doc/gl...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-24 12:17 PST by Dan Bartlett
Modified: 2013-07-12 02:15 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Bartlett 2010-02-24 12:17:14 PST
According to the 3.2 spec (ver. 20091207), Section 2.14 - Asynchronous Queries: 

"A query object is created and made active by calling
void BeginQuery( enum target, uint id );
target indicates the type of query to be performed; valid values of target are defined in subsequent sections. If id is an unused query object name, the name is marked as used and associated with a new query object of the type specified by target.  Otherwise id must be the name of an existing query object of that type.  BeginQuery fails and an INVALID_OPERATION error is generated if id is not
a name returned from a previous call to GenQueries, or if such a name has since
been deleted with DeleteQueries."

However, the following 2 lines don't seem to be compatible:

1) "If id is an unused query object name, the name is marked
as used and associated with a new query object of the type specified by target"

2) "BeginQuery fails and an INVALID_OPERATION error is generated if id is not
a name returned from a previous call to GenQueries, or if such a name has since
been deleted with DeleteQueries"

I assume the first line should be removed, since application-generated object names have been deprecated.
Comment 1 Jon Leech 2010-03-05 01:49:11 PST
Someone was messing with Bugzilla. Fixing fields.
Comment 2 Jon Leech 2013-07-12 02:15:47 PDT
I'm not sure of the exact history of this - maybe the error conditions
were fixed between then and now - but I believe the current 4.3 spec
language is correct. The error generated is restricted to the core
profile, in the compatibility profile you can pass an arbitrary
app-generated name. The names returned by GenQueries are "used,
for the purposes of GenQueries only, but no object is associated
with them until the first time they are used by BeginQuery...".
IOTW they are unused for the purposes of the BeginQuery language,
but they don't generate an error because they are returned by
GenQueries.