Mesa (master): mesa: Require gen'd names in glBeginQuery on ES 3.0.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Nov 19 21:28:12 UTC 2012


Module: Mesa
Branch: master
Commit: bbda7d65a9a71c41eb8dfe7aa3f4fce8c15ebbca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbda7d65a9a71c41eb8dfe7aa3f4fce8c15ebbca

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Nov 17 18:45:00 2012 -0800

mesa: Require gen'd names in glBeginQuery on ES 3.0.

Only legacy OpenGL allows the use of non-gen'd names.  Core profiles
and ES 3 both require the use of glGenQueries().

Note that BeginQuery doesn't exist in ES 1 or ES 2.

Fixes es3conform's occlusion_query_invalid_beginquery test.

Reviewed-and-tested-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/main/queryobj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index dbf40d0..fecbd3f 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -321,7 +321,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
 
    q = _mesa_lookup_query_object(ctx, id);
    if (!q) {
-      if (ctx->API == API_OPENGL_CORE) {
+      if (ctx->API != API_OPENGL) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "glBeginQuery{Indexed}(non-gen name)");
          return;




More information about the mesa-commit mailing list