summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render_translate.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_render_translate.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_render_translate.c')
-rw-r--r--src/gallium/drivers/r300/r300_render_translate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_render_translate.c b/src/gallium/drivers/r300/r300_render_translate.c
index 9247064..41a43b0 100644
--- a/src/gallium/drivers/r300/r300_render_translate.c
+++ b/src/gallium/drivers/r300/r300_render_translate.c
@@ -145,6 +145,7 @@ void r300_begin_vertex_translate(struct r300_context *r300)
vb->max_index = num_verts - 1;
vb->stride = key.output_stride;
r300->tran.vb_slot = i;
+ r300->validate_buffers = TRUE;
break;
}
}
@@ -199,12 +200,14 @@ void r300_translate_index_buffer(struct r300_context *r300,
util_shorten_ubyte_elts(&r300->context, index_buffer, index_offset, *start, count);
*index_size = 2;
*start = 0;
+ r300->validate_buffers = TRUE;
break;
case 2:
if (*start % 2 != 0 || index_offset) {
util_rebuild_ushort_elts(&r300->context, index_buffer, index_offset, *start, count);
*start = 0;
+ r300->validate_buffers = TRUE;
}
break;
@@ -212,6 +215,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
if (index_offset) {
util_rebuild_uint_elts(&r300->context, index_buffer, index_offset, *start, count);
*start = 0;
+ r300->validate_buffers = TRUE;
}
break;
}