mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
mesa: Return error if BeginQuery is called with an existing object of different type
Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4 spec states: "BeginQuery generates an INVALID_OPERATION error if any of the following conditions hold: [...] id is the name of an existing query object whose type does not match target; [...] Similar wording exists in the OpenGL 4.5 spec, section 4.2. QUERY OBJECTS AND ASYNCHRONOUS QUERIES, page 43. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.fragment.begin_query Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
3699866463
commit
dccdf1d687
1 changed files with 16 additions and 0 deletions
|
|
@ -405,6 +405,22 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
|
|||
"glBeginQuery{Indexed}(query already active)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4
|
||||
* spec states:
|
||||
*
|
||||
* "BeginQuery generates an INVALID_OPERATION error if any of the
|
||||
* following conditions hold: [...] id is the name of an
|
||||
* existing query object whose type does not match target; [...]
|
||||
*
|
||||
* Similar wording exists in the OpenGL 4.5 spec, section 4.2. QUERY
|
||||
* OBJECTS AND ASYNCHRONOUS QUERIES, page 43.
|
||||
*/
|
||||
if (q->EverBound && q->Target != target) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBeginQuery{Indexed}(target mismatch)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
q->Target = target;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue