summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_surface.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_surface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c
index 4b135aaf8b..cd1a5b1980 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c
@@ -60,6 +60,10 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
util_copy_framebuffer_state(&lp->framebuffer, fb);
+ if (LP_PERF & PERF_NO_DEPTH) {
+ pipe_surface_reference(&lp->framebuffer.zsbuf, NULL);
+ }
+
/* Tell draw module how deep the Z/depth buffer is */
if (lp->framebuffer.zsbuf) {
int depth_bits;