diff options
author | José Fonseca <[email protected]> | 2011-04-07 16:54:37 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-04-12 12:00:49 +0100 |
commit | 6b95cfb0de1bcd680679a20d6ecc32b42e5d1546 (patch) | |
tree | fb09be44e1bc379cf25aab685fdc8cdff7a570b8 /src/gallium/drivers/svga/svga_draw.c | |
parent | e338a1b0cea94f8c57968b01eebd795c6c8ce74e (diff) |
svga: Rebind framebuffer and tss bindings strictly when necessary.
The earlier change to ensure rendertargets and textures are always
rebound at every command buffer start had the downside of making
successive flushes no longer no-ops, as a command buffer with merely
the rebinding commands were being unnecessarily sent to the vGPU.
This change only re-emits the bindings when necessary, by keeping track
of the need to rebind outside of the dirty state update mechanism.
Diffstat (limited to 'src/gallium/drivers/svga/svga_draw.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_draw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 2c873a0f7ac..d8af615ede1 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -170,6 +170,20 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl ) ib_handle[i] = handle; } + if (svga->rebind.rendertargets) { + ret = svga_reemit_framebuffer_bindings(svga); + if (ret != PIPE_OK) { + return ret; + } + } + + if (svga->rebind.texture_samplers) { + ret = svga_reemit_tss_bindings(svga); + if (ret != PIPE_OK) { + return ret; + } + } + SVGA_DBG(DEBUG_DMA, "draw to sid %p, %d prims\n", svga->curr.framebuffer.cbufs[0] ? svga_surface(svga->curr.framebuffer.cbufs[0])->handle : NULL, |