rbug: Fix depth stencil surface not being sent to the client
authorJakob Bornecrantz <jakob@vmware.com>
Thu, 3 Mar 2011 18:25:49 +0000 (18:25 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Thu, 3 Mar 2011 18:29:17 +0000 (18:29 +0000)
src/gallium/drivers/rbug/rbug_context.c

index 3aefb5b3bb519ecee83038720b0df7f55e14af20..4a5d5413d8cd71737956e352f6af410e5e683479 100644 (file)
@@ -544,6 +544,7 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
 
    rb_pipe->curr.nr_cbufs = 0;
    memset(rb_pipe->curr.cbufs, 0, sizeof(rb_pipe->curr.cbufs));
+   rb_pipe->curr.zsbuf = NULL;
 
    /* unwrap the input state */
    if (_state) {
@@ -556,6 +557,8 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
             rb_pipe->curr.cbufs[i] = rbug_resource(_state->cbufs[i]->texture);
       }
       unwrapped_state.zsbuf = rbug_surface_unwrap(_state->zsbuf);
+      if (_state->zsbuf)
+         rb_pipe->curr.zsbuf = rbug_resource(_state->zsbuf->texture);
       state = &unwrapped_state;
    }