llvmpipe: Fix MSVC build.
[mesa.git] / src / gallium / drivers / llvmpipe / lp_state_surface.c
index 63b8f27b39c026c1a6ce7335edfb86582af5abe9..cd1a5b19803f841d4d03f8c1ee85881c21711d60 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "pipe/p_state.h"
 #include "util/u_inlines.h"
+#include "util/u_framebuffer.h"
 #include "util/u_surface.h"
 #include "lp_context.h"
 #include "lp_scene.h"
@@ -59,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;