summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_vbo.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-04-20 21:18:15 +0200
committerChristoph Bumiller <[email protected]>2010-04-20 22:07:58 +0200
commit3c9df0bda67cdcbc340a4f20997f7a3345cbe9cb (patch)
tree3882dae688fa0540617398a18a56901048d86af2 /src/gallium/drivers/nv50/nv50_vbo.c
parentcaa05ef41996f7d0ac6b77f2fe86b1771cb10e43 (diff)
nv50: support vertex index bias
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_vbo.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 911eabca1cf..34719c956a0 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -401,14 +401,17 @@ nv50_draw_elements_instanced(struct pipe_context *pipe,
if (!nv50_state_validate(nv50, 13 + 16*3))
return;
- assert(indexBias == 0);
-
if (nv50->vbo_fifo) {
nv50_push_elements_instanced(pipe, indexBuffer, indexSize,
indexBias, mode, start, count,
startInstance, instanceCount);
return;
- } else
+ }
+
+ /* indices are uint32 internally, so large indexBias means negative */
+ BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_BASE, 1);
+ OUT_RING (chan, indexBias);
+
if (!(indexBuffer->bind & PIPE_BIND_INDEX_BUFFER) || indexSize == 1) {
nv50_draw_elements_inline(pipe, indexBuffer, indexSize,
mode, start, count, startInstance,