diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-12-26 04:29:44 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-01-07 16:23:49 +0100 |
commit | be1af4394e060677b7db6bbb8e3301e38a3363da (patch) | |
tree | b344b38efd1e18a52a1be8a1dc21150d68cd63eb /src/gallium/drivers/r300/r300_screen_buffer.h | |
parent | 2a7380e9c3a040356599a5b7740aa24e067fc1f5 (diff) | |
download | external_mesa3d-be1af4394e060677b7db6bbb8e3301e38a3363da.zip external_mesa3d-be1af4394e060677b7db6bbb8e3301e38a3363da.tar.gz external_mesa3d-be1af4394e060677b7db6bbb8e3301e38a3363da.tar.bz2 |
r300g: derive user buffer sizes at draw time
This only uploads the [min_index, max_index] range instead of [0, userbuf size],
which greatly speeds up user buffer uploads.
This is also a prerequisite for atomizing vertex arrays in st/mesa.
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen_buffer.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_screen_buffer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.h b/src/gallium/drivers/r300/r300_screen_buffer.h index 70ffcf5..58dec85 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.h +++ b/src/gallium/drivers/r300/r300_screen_buffer.h @@ -61,7 +61,8 @@ struct r300_buffer /* Functions. */ -void r300_upload_user_buffers(struct r300_context *r300); +void r300_upload_user_buffers(struct r300_context *r300, + int min_index, int max_index); void r300_upload_index_buffer(struct r300_context *r300, struct pipe_resource **index_buffer, @@ -72,9 +73,8 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen, const struct pipe_resource *templ); struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen, - void *ptr, - unsigned bytes, - unsigned usage); + void *ptr, unsigned size, + unsigned bind); unsigned r300_buffer_is_referenced(struct pipe_context *context, struct pipe_resource *buf, @@ -87,7 +87,7 @@ static INLINE struct r300_buffer *r300_buffer(struct pipe_resource *buffer) return (struct r300_buffer *)buffer; } -static INLINE boolean r300_buffer_is_user_buffer(struct pipe_resource *buffer) +static INLINE boolean r300_is_user_buffer(struct pipe_resource *buffer) { return r300_buffer(buffer)->user_buffer ? true : false; } |