[Mesa-dev] [PATCH 3/9] st/mesa: make user index buffers optional
Jose Fonseca
jfonseca at vmware.com
Thu Apr 26 11:54:48 PDT 2012
----- Original Message -----
> ---
> src/mesa/state_tracker/st_context.c | 4 +++-
> src/mesa/state_tracker/st_context.h | 1 +
> src/mesa/state_tracker/st_draw.c | 5 +++++
> src/mesa/state_tracker/st_extensions.c | 4 ++++
> 4 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_context.c
> b/src/mesa/state_tracker/st_context.c
> index 84aae81..164cc45 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -155,7 +155,9 @@ st_create_context_priv( struct gl_context *ctx,
> struct pipe_context *pipe )
> st->dirty.mesa = ~0;
> st->dirty.st = ~0;
>
> - st->uploader = u_upload_create(st->pipe, 65536, 4,
> PIPE_BIND_VERTEX_BUFFER);
> + st->uploader = u_upload_create(st->pipe, 128 * 1024, 4,
> + PIPE_BIND_VERTEX_BUFFER |
> + PIPE_BIND_INDEX_BUFFER);
Marek,
Instead of lumping this into the same hardware buffer, I think it would be better to use two separate uploaders so that the driver can effectively do optimization based on PIPE_BIND_VERTEX_BUFFER or PIPE_BIND_INDEX_BUFFER. A quick look on current drivers showed that they do look at these bind flags.
Otherwise I don't see anything wrong with this series. It seems a nice cleanup/speedup.
Brian's OOTO till Monday, so allow more time for him to comment.
Also, once you updated the series, please provide it in a clonable git branch for testing.
Jose
More information about the mesa-dev
mailing list