From c16527fa769987f503e4b86c5cdca9b23a7066b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 23 Dec 2025 13:25:55 -0500 Subject: [PATCH] mesa: allow pipeline statistics in glCreateQueries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All other functions use get_query_binding_point to validate the target. Cc: mesa-stable Reviewed-by: Tapani Pälli (cherry picked from commit 7ed6679361f02ea48562652d11281e927ee06fed) Part-of: --- .pick_status.json | 2 +- src/mesa/main/queryobj.c | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f3f8a14ffa1..25fc75ab1da 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 866972cf8d0..3992cd4779a 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -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; }