summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_cmd.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-08-31 18:28:00 -0600
committerBrian Paul <[email protected]>2016-09-17 10:09:00 -0600
commit581292a78c67335814a3ffb33409f7a62ecedd79 (patch)
tree87a0a6dee430a41713431a752d44624ec6f0d035 /src/gallium/drivers/svga/svga_cmd.c
parentee5f5e226906ff4e18f34d0e7d41aa82dcf51f70 (diff)
svga: try to emit fewer buffer rebind commands
If a consecutive sequence of drawing commands references the same vertex/index buffers, there should be no need to rebind the surfaces for the second and subsequent drawing commands. Apps that use multiple display lists benefit from this since the vertex data for several display lists is often stored in one buffer. In the case of the legacy E&S Glaze demo, this reduces the size of our command buffers from 91KB to 44KB. One WSI Fusion trace shows a 33% reduction in command buffer sizes. Tested with full piglit run. Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_cmd.c')
-rw-r--r--src/gallium/drivers/svga/svga_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c
index e45b3e72aeb..ecf2e9d2ca0 100644
--- a/src/gallium/drivers/svga/svga_cmd.c
+++ b/src/gallium/drivers/svga/svga_cmd.c
@@ -119,6 +119,8 @@ SVGA3D_FIFOReserve(struct svga_winsys_context *swc,
header->id = cmd;
header->size = cmdSize;
+ swc->last_command = cmd;
+
return &header[1];
}