summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource_buffer.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-03-17 21:09:38 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2011-07-01 13:30:38 +0200
commit2b301df4aa00cbf4f88c716bda292d0c7126ff95 (patch)
treeb85ac043e87ae4545ede7924dc80ecb52f0c12ea /src/gallium/drivers/svga/svga_resource_buffer.h
parent0277df86dfdf1738396bc7885bec3054c86c834f (diff)
downloadexternal_mesa3d-2b301df4aa00cbf4f88c716bda292d0c7126ff95.zip
external_mesa3d-2b301df4aa00cbf4f88c716bda292d0c7126ff95.tar.gz
external_mesa3d-2b301df4aa00cbf4f88c716bda292d0c7126ff95.tar.bz2
gallium/svga: Upload only parts of user-buffers that we actually use
Stream user buffer contents rather than trying to maintain persistent host / hardware copies. Resulting negative array offsets are not allowed by the hardware, (well, at least not according to header files), so adjust index bias to make all array offsets positive. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_buffer.h')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index 9503221..2ae44d2 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -132,6 +132,13 @@ struct svga_buffer
} uploaded;
/**
+ * For user buffers, this is the offset to the data about to be
+ * referenced by the next draw command, and hence the data that needs
+ * to be uploaded.
+ */
+ unsigned source_offset;
+
+ /**
* DMA'ble memory.
*
* A piece of GMR memory, with the same size of the buffer. It is created