aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_swtnl_backend.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-19 18:16:08 +0200
committerJosé Fonseca <[email protected]>2010-04-19 18:16:08 +0200
commit9515b78859b52b4532cc9e06366428f2c49c7869 (patch)
tree3cdbe6b5bc6040b142f216932985f55775ecc26a /src/gallium/drivers/svga/svga_swtnl_backend.c
parent989861fc5ea1792e7ea1be07389db7c3e3b8e383 (diff)
svga: Implement index bias.
Untested.
Diffstat (limited to 'src/gallium/drivers/svga/svga_swtnl_backend.c')
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_backend.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c
index e6498136083..b0cbead8a5c 100644
--- a/src/gallium/drivers/svga/svga_swtnl_backend.c
+++ b/src/gallium/drivers/svga/svga_swtnl_backend.c
@@ -247,7 +247,7 @@ svga_vbuf_render_draw( struct vbuf_render *render,
struct svga_vbuf_render *svga_render = svga_vbuf_render(render);
struct svga_context *svga = svga_render->svga;
struct pipe_screen *screen = svga->pipe.screen;
- unsigned bias = (svga_render->vbuf_offset - svga_render->vdecl_offset) / svga_render->vertex_size;
+ int bias = (svga_render->vbuf_offset - svga_render->vdecl_offset) / svga_render->vertex_size;
boolean ret;
size_t size = 2 * nr_indices;
@@ -280,19 +280,21 @@ svga_vbuf_render_draw( struct vbuf_render *render,
ret = svga_hwtnl_draw_range_elements(svga->hwtnl,
svga_render->ibuf,
2,
+ bias,
svga_render->min_index,
svga_render->max_index,
svga_render->prim,
- svga_render->ibuf_offset / 2, nr_indices, bias);
+ svga_render->ibuf_offset / 2, nr_indices);
if(ret != PIPE_OK) {
svga_context_flush(svga, NULL);
ret = svga_hwtnl_draw_range_elements(svga->hwtnl,
svga_render->ibuf,
2,
+ bias,
svga_render->min_index,
svga_render->max_index,
svga_render->prim,
- svga_render->ibuf_offset / 2, nr_indices, bias);
+ svga_render->ibuf_offset / 2, nr_indices);
svga->swtnl.new_vbuf = TRUE;
assert(ret == PIPE_OK);
}