Mesa (pipe-video): [g3dvl] create composite buffer with USAGE_STREAM
Christian König
deathsimple at kemper.freedesktop.org
Fri Apr 8 23:40:05 UTC 2011
Module: Mesa
Branch: pipe-video
Commit: 30c4a07310e880d6ccb2f66efc30e123b8ae60e2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=30c4a07310e880d6ccb2f66efc30e123b8ae60e2
Author: Christian König <deathsimple at vodafone.de>
Date: Thu Apr 7 22:59:48 2011 +0200
[g3dvl] create composite buffer with USAGE_STREAM
Also add PIPE_TRANSFER_DONTBLOCK to mapping options
---
src/gallium/auxiliary/vl/vl_compositor.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index 46579a8..b601f32 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -286,12 +286,11 @@ init_buffers(struct vl_compositor *c)
*/
c->vertex_buf.stride = sizeof(struct vertex4f);
c->vertex_buf.buffer_offset = 0;
- /* XXX: Create with DYNAMIC or STREAM */
c->vertex_buf.buffer = pipe_buffer_create
(
c->pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
- PIPE_USAGE_STATIC,
+ PIPE_USAGE_STREAM,
sizeof(struct vertex4f) * (VL_COMPOSITOR_MAX_LAYERS + 1) * 4
);
@@ -382,7 +381,7 @@ gen_vertex_data(struct vl_compositor *c, struct pipe_video_rect *dst_rect, struc
assert(dst_rect);
vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+ PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | PIPE_TRANSFER_DONTBLOCK,
&buf_transfer);
if (!vb)
More information about the mesa-commit
mailing list