mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 15:40:20 +01:00
mesa/es: Validate glClear mask in Mesa code rather than the ES wrapper
This commit is contained in:
parent
f0c99d0a6a
commit
e58c19a204
2 changed files with 9 additions and 11 deletions
|
|
@ -432,17 +432,6 @@
|
|||
<return type="void"/>
|
||||
<param name="mask" type="GLbitfield"/>
|
||||
</proto>
|
||||
|
||||
<desc name="mask" error="GL_INVALID_VALUE">
|
||||
<value name="0"/>
|
||||
<value name="(GL_COLOR_BUFFER_BIT)"/>
|
||||
<value name="(GL_DEPTH_BUFFER_BIT)"/>
|
||||
<value name="(GL_STENCIL_BUFFER_BIT)"/>
|
||||
<value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)"/>
|
||||
<value name="(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
|
||||
<value name="(GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
|
||||
<value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
|
||||
</desc>
|
||||
</template>
|
||||
|
||||
<template name="ClearColor">
|
||||
|
|
|
|||
|
|
@ -167,6 +167,15 @@ _mesa_Clear( GLbitfield mask )
|
|||
return;
|
||||
}
|
||||
|
||||
/* Accumulation buffers were removed in core contexts, and they never
|
||||
* existed in OpenGL ES.
|
||||
*/
|
||||
if ((mask & GL_ACCUM_BUFFER_BIT) != 0
|
||||
&& (ctx->API == API_OPENGL_CORE || _mesa_is_gles(ctx))) {
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glClear(GL_ACCUM_BUFFER_BIT)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state( ctx ); /* update _Xmin, etc */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue