mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
mesa: Always use the original mask to update stencil buffer
in stencil_and_ztest_pixels. fix #12263
This commit is contained in:
parent
c29886718a
commit
e21d2c6ef3
1 changed files with 5 additions and 2 deletions
|
|
@ -923,6 +923,8 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
|
|||
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
|
||||
_swrast_get_values(ctx, rb, n, x, y, stencil, sizeof(GLubyte));
|
||||
|
||||
_mesa_memcpy(origMask, mask, n * sizeof(GLubyte));
|
||||
|
||||
(void) do_stencil_test(ctx, face, n, stencil, mask);
|
||||
|
||||
if (ctx->Depth.Test == GL_FALSE) {
|
||||
|
|
@ -930,11 +932,12 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
|
|||
n, stencil, mask);
|
||||
}
|
||||
else {
|
||||
_mesa_memcpy(origMask, mask, n * sizeof(GLubyte));
|
||||
GLubyte tmpMask[MAX_WIDTH];
|
||||
_mesa_memcpy(tmpMask, mask, n * sizeof(GLubyte));
|
||||
|
||||
_swrast_depth_test_span(ctx, span);
|
||||
|
||||
compute_pass_fail_masks(n, origMask, mask, passMask, failMask);
|
||||
compute_pass_fail_masks(n, tmpMask, mask, passMask, failMask);
|
||||
|
||||
if (ctx->Stencil.ZFailFunc[face] != GL_KEEP) {
|
||||
apply_stencil_op(ctx, ctx->Stencil.ZFailFunc[face], face,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue