mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
swrast: don't try to do depth testing if there's no depth buffer
Fixes piglit hiz-depth-stencil-test-fbo-d0-s8 crash. See http://bugs.freedesktop.org/show_bug.cgi?id=37907 NOTE: This is a candidate for the 7.11 branch.
This commit is contained in:
parent
e411cd7b0a
commit
37a64baea8
1 changed files with 2 additions and 1 deletions
|
|
@ -462,7 +462,8 @@ stencil_and_ztest_span(struct gl_context *ctx, SWspan *span, GLuint face)
|
|||
* Some fragments passed the stencil test, apply depth test to them
|
||||
* and apply Zpass and Zfail stencil ops.
|
||||
*/
|
||||
if (ctx->Depth.Test == GL_FALSE) {
|
||||
if (ctx->Depth.Test == GL_FALSE ||
|
||||
ctx->DrawBuffer->_DepthBuffer == NULL) {
|
||||
/*
|
||||
* No depth buffer, just apply zpass stencil function to active pixels.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue