mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa: Throw an error instead of asserting for condrender with query == 0.
From the NV_conditional_render spec:
BeginQuery sets the active query object name for the query type given by
<target> to <id>. If BeginQuery is called with an <id> of zero, if the
active query object name for <target> is non-zero, if <id> is the active
query object name for any query type, or if <id> is the active query
object for condtional rendering (Section 2.X), the error INVALID OPERATION
is generated.
Fixes piglit nv_conditional_render-begin-zero.
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
8899f6e93c
commit
7371224c06
1 changed files with 2 additions and 1 deletions
|
|
@ -44,7 +44,8 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
|
|||
struct gl_query_object *q;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery) {
|
||||
if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery ||
|
||||
queryId == 0) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue