summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-01-28 22:04:09 +0100
committerMarek Olšák <maraeo@gmail.com>2011-01-30 03:29:48 +0100
commit8c631cfeae29b5236928f759e222aa35e6e4984c (patch)
treee33a9fbf1e7f929dbfe5524ffe01dfc102749b6b /src/gallium/drivers/r600/r600_pipe.h
parent15730a8207374936e354d945730070cb29c9547c (diff)
r600g: rework vertex buffer uploads
Only upload the [min_index, max_index] range instead of [0, userbuf_size]. This an important optimization. Framerate in Lightsmark: Before: 22 fps After: 75 fps The same optimization is already in r300g.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index a0164868f3..360ee2af1f 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -144,6 +144,7 @@ struct r600_pipe_context {
struct pipe_framebuffer_state framebuffer;
struct pipe_index_buffer index_buffer;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+ struct pipe_resource *real_vertex_buffer[PIPE_MAX_ATTRIBS];
unsigned nvertex_buffer;
unsigned cb_target_mask;
/* for saving when using blitter */
@@ -207,7 +208,8 @@ unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
struct winsys_handle *whandle);
void r600_upload_index_buffer(struct r600_pipe_context *rctx, struct r600_drawl *draw);
-void r600_upload_user_buffers(struct r600_pipe_context *rctx);
+void r600_upload_user_buffers(struct r600_pipe_context *rctx,
+ int min_index, int max_index);
/* r600_query.c */
void r600_init_query_functions(struct r600_pipe_context *rctx);
@@ -279,7 +281,6 @@ void r600_delete_ps_shader(struct pipe_context *ctx, void *state);
void r600_delete_vs_shader(struct pipe_context *ctx, void *state);
void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
struct pipe_resource *buffer);
-void r600_vertex_buffer_update(struct r600_pipe_context *rctx);
void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info);
/*