projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i965/fs: Remove duplicate include of brw_shader.h
[mesa.git]
/
src
/
mesa
/
swrast
/
s_stencil.c
diff --git
a/src/mesa/swrast/s_stencil.c
b/src/mesa/swrast/s_stencil.c
index 0c46d934e0d849ec574c5fa2bd0783a7069e0565..eba9da863bac41167c93659501fa2a77c5387f59 100644
(file)
--- a/
src/mesa/swrast/s_stencil.c
+++ b/
src/mesa/swrast/s_stencil.c
@@
-1,6
+1,5
@@
/*
* Mesa 3-D graphics library
/*
* Mesa 3-D graphics library
- * Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@
-29,6
+28,8
@@
#include "main/imports.h"
#include "main/format_pack.h"
#include "main/format_unpack.h"
#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"
#include "s_context.h"
#include "s_depth.h"
@@
-60,7
+61,7
@@
ENDIF
* within the 4-byte pixel will be either 0 or 3.
*/
static GLint
* within the 4-byte pixel will be either 0 or 3.
*/
static GLint
-get_stencil_offset(
gl
_format format)
+get_stencil_offset(
mesa
_format format)
{
const GLubyte one = 1;
GLubyte pixel[MAX_PIXEL_BYTES];
{
const GLubyte one = 1;
GLubyte pixel[MAX_PIXEL_BYTES];
@@
-129,7
+130,7
@@
apply_stencil_op(const struct gl_context *ctx, GLenum oper, GLuint face,
GLuint n, GLubyte stencil[], const GLubyte mask[],
GLint stride)
{
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;
const GLubyte wrtmask = ctx->Stencil.WriteMask[face];
const GLubyte invmask = (GLubyte) (~wrtmask);
GLuint i, j;
@@
-216,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];
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;
/*
GLubyte s;
/*
@@
-299,7
+300,7
@@
get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_S8) {
+ if (rb->Format == MESA_FORMAT_S
_UINT
8) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@
-586,7
+587,7
@@
_swrast_clear_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
}
switch (rb->Format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S
_UINT
8:
{
GLubyte clear = ctx->Stencil.Clear & writeMask & 0xff;
GLubyte mask = (~writeMask) & 0xff;
{
GLubyte clear = ctx->Stencil.Clear & writeMask & 0xff;
GLubyte mask = (~writeMask) & 0xff;
@@
-613,7
+614,7
@@
_swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
}
}
break;
- case MESA_FORMAT_
S8_Z24
:
+ case MESA_FORMAT_
Z24_UNORM_S8_UINT
:
{
GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;
{
GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;
@@
-626,7
+627,7
@@
_swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
}
}
break;
- case MESA_FORMAT_
Z24_S8
:
+ case MESA_FORMAT_
S8_UINT_Z24_UNORM
:
{
GLuint clear = ctx->Stencil.Clear & writeMask & 0xff;
GLuint mask = 0xffffff00 | ((~writeMask) & 0xff);
{
GLuint clear = ctx->Stencil.Clear & writeMask & 0xff;
GLuint mask = 0xffffff00 | ((~writeMask) & 0xff);