mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
swrast: Use accessor for stencil reference values
NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-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 978f91b829)
This commit is contained in:
parent
99540782b4
commit
68c8db9db5
1 changed files with 4 additions and 2 deletions
|
|
@ -28,6 +28,8 @@
|
|||
#include "main/imports.h"
|
||||
#include "main/format_pack.h"
|
||||
#include "main/format_unpack.h"
|
||||
#include "main/core.h"
|
||||
#include "main/stencil.h"
|
||||
|
||||
#include "s_context.h"
|
||||
#include "s_depth.h"
|
||||
|
|
@ -128,7 +130,7 @@ apply_stencil_op(const struct gl_context *ctx, GLenum oper, GLuint face,
|
|||
GLuint n, GLubyte stencil[], const GLubyte mask[],
|
||||
GLint stride)
|
||||
{
|
||||
const GLubyte ref = ctx->Stencil.Ref[face];
|
||||
const GLubyte ref = _mesa_get_stencil_ref(ctx, face);
|
||||
const GLubyte wrtmask = ctx->Stencil.WriteMask[face];
|
||||
const GLubyte invmask = (GLubyte) (~wrtmask);
|
||||
GLuint i, j;
|
||||
|
|
@ -215,7 +217,7 @@ do_stencil_test(struct gl_context *ctx, GLuint face, GLuint n,
|
|||
GLboolean allfail = GL_FALSE;
|
||||
GLuint i, j;
|
||||
const GLuint valueMask = ctx->Stencil.ValueMask[face];
|
||||
const GLubyte ref = (GLubyte) (ctx->Stencil.Ref[face] & valueMask);
|
||||
const GLubyte ref = (GLubyte) (_mesa_get_stencil_ref(ctx, face) & valueMask);
|
||||
GLubyte s;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue