mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
mesa: Stop clamping stencil reference value at specification time
All drivers now clamp this to the appropriate range for the bound
stencil buffer when emitting stencil state.
NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 53a5f11f0d)
This commit is contained in:
parent
68c8db9db5
commit
41c4b21d18
1 changed files with 0 additions and 9 deletions
|
|
@ -135,7 +135,6 @@ void GLAPIENTRY
|
|||
_mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glStencilFuncSeparateATI()\n");
|
||||
|
|
@ -151,8 +150,6 @@ _mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLui
|
|||
return;
|
||||
}
|
||||
|
||||
ref = CLAMP( ref, 0, stencilMax );
|
||||
|
||||
/* set both front and back state */
|
||||
if (ctx->Stencil.Function[0] == frontfunc &&
|
||||
ctx->Stencil.Function[1] == backfunc &&
|
||||
|
|
@ -192,7 +189,6 @@ void GLAPIENTRY
|
|||
_mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
|
|
@ -203,8 +199,6 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
|||
return;
|
||||
}
|
||||
|
||||
ref = CLAMP( ref, 0, stencilMax );
|
||||
|
||||
if (face != 0) {
|
||||
if (ctx->Stencil.Function[face] == func &&
|
||||
ctx->Stencil.ValueMask[face] == mask &&
|
||||
|
|
@ -467,7 +461,6 @@ void GLAPIENTRY
|
|||
_mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glStencilFuncSeparate()\n");
|
||||
|
|
@ -481,8 +474,6 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
|
|||
return;
|
||||
}
|
||||
|
||||
ref = CLAMP(ref, 0, stencilMax);
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
|
||||
if (face != GL_BACK) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue