diff options
author | marha <marha@users.sourceforge.net> | 2010-03-07 16:00:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-03-07 16:00:29 +0000 |
commit | b40894093babb10f3cd155f11ff2d6c710372395 (patch) | |
tree | e6e94e5aa39ca9d5a653af567145e4b5dda25d61 /mesalib/src/mesa/vbo/vbo_rebase.c | |
parent | d27419efcdaaccb40e0f10c549a6b732a2f29e81 (diff) | |
parent | 14b1cb8d5a27ec9716d3f790fce95f0469e35605 (diff) | |
download | vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.gz vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.bz2 vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_rebase.c')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_rebase.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_rebase.c b/mesalib/src/mesa/vbo/vbo_rebase.c index 3bf7ef580..55a82ee36 100644 --- a/mesalib/src/mesa/vbo/vbo_rebase.c +++ b/mesalib/src/mesa/vbo/vbo_rebase.c @@ -126,7 +126,23 @@ void vbo_rebase_prims( GLcontext *ctx, if (0) _mesa_printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); - if (ib) { + + /* XXX this path is disabled for now. + * There's rendering corruption in some apps when it's enabled. + */ + if (0 && ib && ctx->Extensions.ARB_draw_elements_base_vertex) { + /* If we can just tell the hardware or the TNL to interpret our + * indices with a different base, do so. + */ + tmp_prims = (struct _mesa_prim *)_mesa_malloc(sizeof(*prim) * nr_prims); + + for (i = 0; i < nr_prims; i++) { + tmp_prims[i] = prim[i]; + tmp_prims[i].basevertex -= min_index; + } + + prim = tmp_prims; + } else if (ib) { /* Unfortunately need to adjust each index individually. */ GLboolean map_ib = ib->obj->Name && !ib->obj->Pointer; |