diff options
| author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-09-02 18:31:49 +0200 | 
|---|---|---|
| committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-09-02 18:31:49 +0200 | 
| commit | 222d2f2ac2c7d93cbc0643082c78278ad2c8cfce (patch) | |
| tree | b79152c238022b2a901201c22e5809ac520732bf /src/gallium/drivers/svga/svga_state_framebuffer.c | |
| parent | 443abc80db9e1a288ce770e76cccd43664348098 (diff) | |
| parent | e73c5501b2fe20290d1b691c85a5d82ac3a0431c (diff) | |
Merge remote branch 'origin/master' into nv50-compiler
Conflicts:
	src/gallium/drivers/nv50/nv50_program.c
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_framebuffer.c')
| -rw-r--r-- | src/gallium/drivers/svga/svga_state_framebuffer.c | 15 | 
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c index bd92f00343..fcbb35e797 100644 --- a/src/gallium/drivers/svga/svga_state_framebuffer.c +++ b/src/gallium/drivers/svga/svga_state_framebuffer.c @@ -43,15 +43,18 @@ static int emit_framebuffer( struct svga_context *svga,  {     const struct pipe_framebuffer_state *curr = &svga->curr.framebuffer;     struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer; +   boolean reemit = !!(dirty & SVGA_NEW_COMMAND_BUFFER);     unsigned i;     enum pipe_error ret; -   /* XXX: Need shadow state in svga->hw to eliminate redundant -    * uploads, especially of NULL buffers. +   /* +    * We need to reemit non-null surface bindings, even when they are not +    * dirty, to ensure that the resources are paged in.      */     for(i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) { -      if (curr->cbufs[i] != hw->cbufs[i]) { +      if (curr->cbufs[i] != hw->cbufs[i] || +          (reemit && hw->cbufs[i])) {           if (svga->curr.nr_fbs++ > 8)              return PIPE_ERROR_OUT_OF_MEMORY; @@ -64,7 +67,8 @@ static int emit_framebuffer( struct svga_context *svga,     } -   if (curr->zsbuf != hw->zsbuf) { +   if (curr->zsbuf != hw->zsbuf || +       (reemit && hw->zsbuf)) {        ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_DEPTH, curr->zsbuf);        if (ret != PIPE_OK)           return ret; @@ -92,7 +96,8 @@ static int emit_framebuffer( struct svga_context *svga,  struct svga_tracked_state svga_hw_framebuffer =   {     "hw framebuffer state", -   SVGA_NEW_FRAME_BUFFER, +   SVGA_NEW_FRAME_BUFFER | +   SVGA_NEW_COMMAND_BUFFER,     emit_framebuffer  };  | 
