nv50: Adapt for index bias interface change.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 19 Apr 2010 16:17:45 +0000 (18:17 +0200)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 19 Apr 2010 16:17:45 +0000 (18:17 +0200)
src/gallium/drivers/nv50/nv50_context.h
src/gallium/drivers/nv50/nv50_push.c
src/gallium/drivers/nv50/nv50_vbo.c

index 8bf465378e3ff1fb27ce678ad0e72daec75d7f54..4875f8330541c471ae7a54db20c73b76086a116d 100644 (file)
@@ -185,12 +185,12 @@ extern void nv50_draw_arrays_instanced(struct pipe_context *, unsigned mode,
                                        unsigned instanceCount);
 extern void nv50_draw_elements(struct pipe_context *pipe,
                                  struct pipe_resource *indexBuffer,
-                                 unsigned indexSize,
+                                 unsigned indexSize, int indexBias,
                                  unsigned mode, unsigned start,
                                  unsigned count);
 extern void nv50_draw_elements_instanced(struct pipe_context *pipe,
                                         struct pipe_resource *indexBuffer,
-                                        unsigned indexSize,
+                                        unsigned indexSize, int indexBias,
                                         unsigned mode, unsigned start,
                                         unsigned count,
                                         unsigned startInstance,
index 6981e5b919b5e7a0d7a00a8a55b3cb1893fb3e73..c54fed5a36fc529a82362ea878bf9949b2f8d8b1 100644 (file)
@@ -172,7 +172,8 @@ emit_verts(void *priv, unsigned start, unsigned count)
 
 void
 nv50_push_elements_instanced(struct pipe_context *pipe,
-                             struct pipe_resource *idxbuf, unsigned idxsize,
+                             struct pipe_resource *idxbuf,
+                             unsigned idxsize, int idxbias,
                              unsigned mode, unsigned start, unsigned count,
                              unsigned i_start, unsigned i_count)
 {
@@ -269,6 +270,7 @@ nv50_push_elements_instanced(struct pipe_context *pipe,
       }
       ctx.idxbuf = bo->map;
       ctx.idxsize = idxsize;
+      assert(idxbias == 0);
       nouveau_bo_unmap(bo);
    }
 
index 609145db88afaa36ecbc9243cf58c8e52aa7fba2..932c1e8992392caef0e1ffd0f0435a737e4fdaeb 100644 (file)
@@ -387,7 +387,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
 void
 nv50_draw_elements_instanced(struct pipe_context *pipe,
                             struct pipe_resource *indexBuffer,
-                            unsigned indexSize,
+                            unsigned indexSize, int indexBias,
                             unsigned mode, unsigned start, unsigned count,
                             unsigned startInstance, unsigned instanceCount)
 {
@@ -401,6 +401,8 @@ 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,
                                             mode, start, count, startInstance,
@@ -460,10 +462,11 @@ nv50_draw_elements_instanced(struct pipe_context *pipe,
 
 void
 nv50_draw_elements(struct pipe_context *pipe,
-                  struct pipe_resource *indexBuffer, unsigned indexSize,
+                  struct pipe_resource *indexBuffer,
+                  unsigned indexSize, int indexBias,
                   unsigned mode, unsigned start, unsigned count)
 {
-       nv50_draw_elements_instanced(pipe, indexBuffer, indexSize,
+       nv50_draw_elements_instanced(pipe, indexBuffer, indexSize, indexBias,
                                     mode, start, count, 0, 1);
 }