summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-04 18:00:46 +0100
committerMarek Olšák <[email protected]>2013-01-04 21:08:28 +0100
commitad1d1a4d9e4cb06424d477ddabac5885fa0613af (patch)
tree24ec0951d5f09b333f17daca6a5dccc28e61f3fe /src/gallium/drivers/r300/r300_emit.c
parent37fd455b21d4825b569a45ffd5d930347a042cea (diff)
r300g/swtcl: simplify vertex uploading
- skip the vertex buffer reallocation in flush and just use the unsynchronized flag to get new memory. - remove the cruft needed to get around the issues with the vertex buffer reallocation in flush - use pb_buffer instead of pipe_resource
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 6ddb5066bb8..51c14b43e41 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -930,7 +930,10 @@ void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed)
(r300->vertex_info.size << 8));
OUT_CS(r300->draw_vbo_offset);
OUT_CS(0);
- OUT_CS_RELOC(r300_resource(r300->vbo));
+
+ assert(r300->vbo_cs);
+ cs_winsys->cs_write_reloc(cs_copy, r300->vbo_cs);
+ CS_USED_DW(2);
END_CS;
}
@@ -1212,10 +1215,9 @@ validate:
r300->rws->cs_add_reloc(r300->cs, r300->query_current->cs_buf,
RADEON_USAGE_WRITE, RADEON_DOMAIN_GTT);
/* ...vertex buffer for SWTCL path... */
- if (r300->vbo)
- r300->rws->cs_add_reloc(r300->cs, r300_resource(r300->vbo)->cs_buf,
- RADEON_USAGE_READ,
- r300_resource(r300->vbo)->domain);
+ if (r300->vbo_cs)
+ r300->rws->cs_add_reloc(r300->cs, r300->vbo_cs,
+ RADEON_USAGE_READ, RADEON_DOMAIN_GTT);
/* ...vertex buffers for HWTCL path... */
if (do_validate_vertex_buffers && r300->vertex_arrays_dirty) {
struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;