aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-22 13:51:38 +0100
committerMarek Olšák <[email protected]>2010-02-23 03:33:24 +0100
commit902ccfcb40f21e1a5fca2f1bec1cbbabb053d8cf (patch)
tree9c62b00112c36f32df735691f64a884fb5e4f494 /src/gallium
parentb330928549b39e97e16aee636c335865504ffab9 (diff)
r300g: fix draw_elements for "start" != 0
Reported-by: Andre Maasikas <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_render.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 754eb4dc769..648d884654f 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -258,11 +258,6 @@ static void r300_emit_draw_elements(struct r300_context *r300,
assert((start * indexSize) % 4 == 0);
- /* XXX Non-zero offset locks up. */
- if (offset_dwords != 0) {
- return;
- }
-
if (alt_num_verts) {
assert(count < (1 << 24));
BEGIN_CS(16);
@@ -276,13 +271,13 @@ static void r300_emit_draw_elements(struct r300_context *r300,
OUT_CS_REG(R300_VAP_VF_MAX_VTX_INDX, maxIndex);
OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, 0);
if (indexSize == 4) {
- count_dwords = count + start;
+ count_dwords = count;
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
R300_VAP_VF_CNTL__INDEX_SIZE_32bit |
r300_translate_primitive(mode) |
(alt_num_verts ? R500_VAP_VF_CNTL__USE_ALT_NUM_VERTS : 0));
} else {
- count_dwords = (count + start + 1) / 2;
+ count_dwords = (count + 1) / 2;
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
r300_translate_primitive(mode) |
(alt_num_verts ? R500_VAP_VF_CNTL__USE_ALT_NUM_VERTS : 0));