From 1cc98f5a48924d750fbef7ea6b05a1ba49c28589 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 5 Nov 2012 07:36:16 +0100 Subject: xserver mesa xkbcomp git update 5 nov 2012 xserver: a194630f7f7b287cb4ea4a459df0745f4c0d4c1a mesa: ccbfe3dde94cd50a4e6468cfeabf95c79c9d8072 xkbcomp: a68c5b7b29eb1433b1be73b50c4248e10eab8e64 --- mesalib/src/mesa/main/queryobj.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/main/queryobj.c') diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index d21691328..1e39adc49 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -321,13 +321,19 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id) q = _mesa_lookup_query_object(ctx, id); if (!q) { - /* create new object */ - q = ctx->Driver.NewQueryObject(ctx, id); - if (!q) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}"); + if (ctx->API == API_OPENGL_CORE) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBeginQuery{Indexed}(non-gen name)"); return; + } else { + /* create new object */ + q = ctx->Driver.NewQueryObject(ctx, id); + if (!q) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}"); + return; + } + _mesa_HashInsert(ctx->Query.QueryObjects, id, q); } - _mesa_HashInsert(ctx->Query.QueryObjects, id, q); } else { /* pre-existing object */ -- cgit v1.2.3