mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
mesa: allow pipeline statistics in glCreateQueries
All other functions use get_query_binding_point to validate the target.
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 7ed6679361)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
This commit is contained in:
parent
88eb8921d4
commit
c16527fa76
2 changed files with 3 additions and 15 deletions
|
|
@ -14,7 +14,7 @@
|
|||
"description": "mesa: allow pipeline statistics in glCreateQueries",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -651,20 +651,8 @@ _mesa_CreateQueries(GLenum target, GLsizei n, GLuint *ids)
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
switch (target) {
|
||||
case GL_SAMPLES_PASSED:
|
||||
case GL_ANY_SAMPLES_PASSED:
|
||||
case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
|
||||
case GL_TIME_ELAPSED:
|
||||
case GL_TIMESTAMP:
|
||||
case GL_PRIMITIVES_GENERATED:
|
||||
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
|
||||
case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW:
|
||||
case GL_TRANSFORM_FEEDBACK_OVERFLOW:
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glCreateQueries(invalid target = %s)",
|
||||
_mesa_enum_to_string(target));
|
||||
if (target != GL_TIMESTAMP && !get_query_binding_point(ctx, target, 0)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glCreateQueries(target)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue