summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_buffers.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_buffers.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
index a356fd1212..42d8691752 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
@@ -239,7 +239,10 @@ nouveau_build_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
_mesa_update_draw_buffer_bounds(ctx);
color[0] = (nouveau_renderbuffer *)fb->_ColorDrawBuffers[0][0];
- depth = (nouveau_renderbuffer *)fb->_DepthBuffer;
+ if (fb->_DepthBuffer && fb->_DepthBuffer->Wrapped)
+ depth = (nouveau_renderbuffer *)fb->_DepthBuffer->Wrapped;
+ else
+ depth = (nouveau_renderbuffer *)fb->_DepthBuffer;
if (!nmesa->hw_func.BindBuffers(nmesa, 1, color, depth))
return GL_FALSE;