summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_index_modify.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-13 09:13:14 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-15 22:44:21 +0100
commiteafb7f234d11a290b00dcaf5492b9bdad1cf5148 (patch)
tree6abe76f35f3dd25c9c3f537b4a4765ec9bb2e46f /src/gallium/auxiliary/util/u_index_modify.c
parent82a9794a35744d60adc38b5eee53153c73d07331 (diff)
gallium: add usage parameter to pipe_buffer_create
And set a reasonable buffer usage flag everywhere instead of just PIPE_USAGE_DEFAULT.
Diffstat (limited to 'src/gallium/auxiliary/util/u_index_modify.c')
-rw-r--r--src/gallium/auxiliary/util/u_index_modify.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_index_modify.c b/src/gallium/auxiliary/util/u_index_modify.c
index fda396ba09..d0a28b5fdf 100644
--- a/src/gallium/auxiliary/util/u_index_modify.c
+++ b/src/gallium/auxiliary/util/u_index_modify.c
@@ -65,6 +65,7 @@ void util_shorten_ubyte_elts(struct pipe_context *context,
new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
out_map = pipe_buffer_map(context, new_elts, PIPE_TRANSFER_WRITE,
@@ -116,6 +117,7 @@ void util_rebuild_ushort_elts(struct pipe_context *context,
new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
out_map = pipe_buffer_map(context, new_elts,
@@ -167,6 +169,7 @@ void util_rebuild_uint_elts(struct pipe_context *context,
new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
out_map = pipe_buffer_map(context, new_elts,