draw: fix piglit base vertex + user vertex array tests
authorDave Airlie <airlied@redhat.com>
Mon, 2 Jan 2012 17:41:34 +0000 (17:41 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 6 Jan 2012 13:36:35 +0000 (13:36 +0000)
This fixes
draw-elements-base-vertex user_varrays
draw-elements-instanced-base-vertex user_varrays
for softpipe with no llvm support (DRAW_USE_LLVM=false)

I'm not sure if this is the correct answer, but these tests were showing
a max_index of 7, then trying to fetch up to 43, maybe it should be fixing
max_index earlier somewhere to take care of this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/draw/draw_pt_fetch.c

index 5589a8212e470ac7ebf2f6df9ba8be1e018a8e77..81c7ec71ef7aaca01b74224680c01d1cf1b35c74 100644 (file)
@@ -166,7 +166,7 @@ void draw_pt_fetch_run_linear( struct pt_fetch *fetch,
                            ((char *)draw->pt.user.vbuffer[i] +
                             draw->pt.vertex_buffer[i].buffer_offset),
                            draw->pt.vertex_buffer[i].stride,
-                           draw->pt.user.max_index);
+                           draw->pt.user.max_index + draw->pt.user.eltBias);
    }
 
    translate->run( translate,