summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_idct.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-12-08 20:48:34 +0100
committerChristian König <[email protected]>2010-12-08 20:48:34 +0100
commit1482b9a7f39ec8875fcd4137c35b3cb9ac0c0934 (patch)
tree059684cb7de7026739652bb7853c9173c7839fd2 /src/gallium/auxiliary/vl/vl_idct.c
parent8df88ca10fbfc56fca715fe60ab2edecd15d5736 (diff)
[g3dvl] remove shadow buffering of vertex buffers
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_idct.c')
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index 168e6e88b2b..0a81134a789 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -464,14 +464,13 @@ init_vertex_buffers(struct vl_idct *idct, struct vl_idct_buffer *buffer)
buffer->vertex_bufs.individual.quad.buffer_offset = idct->quad.buffer_offset;
pipe_resource_reference(&buffer->vertex_bufs.individual.quad.buffer, idct->quad.buffer);
- buffer->vertex_bufs.individual.pos = vl_vb_create_buffer(idct->pipe, idct->max_blocks, idct->vertex_buffer_stride);
+ buffer->vertex_bufs.individual.pos = vl_vb_init(
+ &buffer->blocks, idct->pipe, idct->max_blocks, 2,
+ idct->vertex_buffer_stride);
if(buffer->vertex_bufs.individual.pos.buffer == NULL)
return false;
- if (!vl_vb_init(&buffer->blocks, idct->max_blocks, 2))
- return false;
-
return true;
}
@@ -668,6 +667,8 @@ vl_idct_map_buffers(struct vl_idct *idct, struct vl_idct_buffer *buffer)
);
buffer->texels = idct->pipe->transfer_map(idct->pipe, buffer->tex_transfer);
+
+ vl_vb_map(&buffer->blocks, idct->pipe);
}
void
@@ -699,28 +700,17 @@ vl_idct_unmap_buffers(struct vl_idct *idct, struct vl_idct_buffer *buffer)
idct->pipe->transfer_unmap(idct->pipe, buffer->tex_transfer);
idct->pipe->transfer_destroy(idct->pipe, buffer->tex_transfer);
+ vl_vb_unmap(&buffer->blocks, idct->pipe);
}
void
vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer)
{
- struct pipe_transfer *vec_transfer;
- void *vectors;
unsigned num_verts;
assert(idct);
- vectors = pipe_buffer_map
- (
- idct->pipe,
- buffer->vertex_bufs.individual.pos.buffer,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
- &vec_transfer
- );
-
- num_verts = vl_vb_upload(&buffer->blocks, vectors);
-
- pipe_buffer_unmap(idct->pipe, buffer->vertex_bufs.individual.pos.buffer, vec_transfer);
+ num_verts = vl_vb_restart(&buffer->blocks);
if(num_verts > 0) {