summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-07 07:54:31 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-07 08:46:18 +0100
commit4953ba6a717ad1d3aa4426d147b52d05932c47ab (patch)
treef30608d28c439c83365fc273795d5ee1c3ac4e60 /src/gallium/drivers/r300/r300_emit.c
parent78068a5fbfc21fb52b289a81142b4211628f845c (diff)
downloadexternal_mesa3d-4953ba6a717ad1d3aa4426d147b52d05932c47ab.zip
external_mesa3d-4953ba6a717ad1d3aa4426d147b52d05932c47ab.tar.gz
external_mesa3d-4953ba6a717ad1d3aa4426d147b52d05932c47ab.tar.bz2
r300g: validate buffers only if any of bound buffers is changed
This prevents needless buffer validation (CS space checking).
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 82391e1..04a5bd9 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -1219,12 +1219,6 @@ boolean r300_emit_buffer_validate(struct r300_context *r300,
struct pipe_resource *pbuf;
unsigned i;
- /* upload buffers first */
- if (r300->screen->caps.has_tcl && r300->any_user_vbs) {
- r300_upload_user_buffers(r300);
- r300->any_user_vbs = false;
- }
-
/* Clean out BOs. */
r300->rws->cs_reset_buffers(r300->cs);
@@ -1263,6 +1257,8 @@ boolean r300_emit_buffer_validate(struct r300_context *r300,
if (do_validate_vertex_buffers) {
for (i = 0; i < r300->velems->count; i++) {
pbuf = vbuf[velem[i].vertex_buffer_index].buffer;
+ if (!pbuf)
+ continue;
r300->rws->cs_add_buffer(r300->cs, r300_buffer(pbuf)->cs_buf,
r300_buffer(pbuf)->domain, 0);