mesa: allow pipeline statistics in glCreateQueries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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:
Marek Olšák 2025-12-23 13:25:55 -05:00 committed by Dylan Baker
parent 88eb8921d4
commit c16527fa76
2 changed files with 3 additions and 15 deletions

View file

@ -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

View file

@ -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;
}