summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-09-17 14:01:50 +1000
committerDave Airlie <airlied@redhat.com>2010-09-17 15:29:31 +1000
commit0d76bb5d4c5c867155f7fb381c46018e1560b790 (patch)
tree41449f2f5ba46b87ab76a864931ce36ba738223c /src/gallium/drivers/r600/r600_context.h
parenta927d0477a47e29d72e518880979e11e8c0f98e7 (diff)
r600g: add upload manager support.
this add support for the upload manager for uploading user vbo/index buffers. this provides a considerable speedup in q3 type games.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index f82c8f82fe..3107f189c7 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -34,6 +34,8 @@
#include "radeon.h"
#include "r600_shader.h"
+struct u_upload_mgr;
+
#define R600_QUERY_STATE_STARTED (1 << 0)
#define R600_QUERY_STATE_ENDED (1 << 1)
#define R600_QUERY_STATE_SUSPENDED (1 << 2)
@@ -249,6 +251,12 @@ struct r600_context {
struct pipe_index_buffer index_buffer;
struct pipe_blend_color blend_color;
struct list_head query_list;
+
+ /* upload managers */
+ struct u_upload_mgr *upload_vb;
+ struct u_upload_mgr *upload_ib;
+ bool any_user_vbs;
+
};
/* Convenience cast wrapper. */
@@ -306,4 +314,8 @@ void eg_set_constant_buffer(struct pipe_context *ctx,
uint shader, uint index,
struct pipe_resource *buffer);
+int r600_upload_index_buffer(struct r600_context *rctx,
+ struct r600_draw *draw);
+int r600_upload_user_buffers(struct r600_context *rctx);
+
#endif