aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_stencil.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast/s_stencil.c')
-rw-r--r--mesalib/src/mesa/swrast/s_stencil.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mesalib/src/mesa/swrast/s_stencil.c b/mesalib/src/mesa/swrast/s_stencil.c
index 3423737ee..a63a773cf 100644
--- a/mesalib/src/mesa/swrast/s_stencil.c
+++ b/mesalib/src/mesa/swrast/s_stencil.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -28,6 +29,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 +131,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 +218,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;
/*