summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_screen_buffer.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-18 16:40:14 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-22 21:46:40 +0000
commit2452921e5adb56a3d99e52fb2b963fcd2a0b75e9 (patch)
tree3314f3c2da15088d0d55dacfa49a5abac440d860 /src/gallium/drivers/svga/svga_screen_buffer.h
parent3a6e581f2f56097aa1b17a131b818a70a888cd98 (diff)
svga: Break uploads of big buffers into smaller pieces.
Fixes crash in Homeworld2 which tries to create a 14MB buffer, because we now avoid creating GMR buffers larger than 8MB to ensure progress given we have only a 16MB pool.
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen_buffer.h')
-rw-r--r--src/gallium/drivers/svga/svga_screen_buffer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_buffer.h b/src/gallium/drivers/svga/svga_screen_buffer.h
index 044fa0a465..937cf30478 100644
--- a/src/gallium/drivers/svga/svga_screen_buffer.h
+++ b/src/gallium/drivers/svga/svga_screen_buffer.h
@@ -201,6 +201,16 @@ svga_buffer_is_user_buffer( struct pipe_buffer *buffer )
void
svga_screen_init_buffer_functions(struct pipe_screen *screen);
+
+/**
+ * Get the host surface handle for this buffer.
+ *
+ * This will ensure the host surface is updated, issuing DMAs as needed.
+ *
+ * NOTE: This may insert new commands in the context, so it *must* be called
+ * before reserving command buffer space. And, in order to insert commands
+ * it may need to call svga_context_flush().
+ */
struct svga_winsys_surface *
svga_buffer_handle(struct svga_context *svga,
struct pipe_buffer *buf);