diff options
author | Ilia Mirkin <[email protected]> | 2015-06-28 22:30:27 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-06-29 00:46:45 -0400 |
commit | b5622313ea2e070cc0c20c7cdccd844d383713d0 (patch) | |
tree | 4082fb3ede487f2511bcfb71d83a7a3a60060dbf /src | |
parent | 19a0ba130fd0d0f3b86181a8d05cf5391420360d (diff) |
nv40: enable base vertex
Still appears to have issues with negative indices less than -1M, but
that's a corner case of a corner case.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30-40_3d.xml.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_vbo.c | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30-40_3d.xml.h b/src/gallium/drivers/nouveau/nv30/nv30-40_3d.xml.h index 447f4b3b7ae..95468e580dd 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30-40_3d.xml.h +++ b/src/gallium/drivers/nouveau/nv30/nv30-40_3d.xml.h @@ -1459,6 +1459,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV40_3D_VTX_CACHE_INVALIDATE 0x00001714 +#define NV40_3D_VB_ELEMENT_BASE 0x0000173c + #define NV30_3D_VTXFMT(i0) (0x00001740 + 0x4*(i0)) #define NV30_3D_VTXFMT__ESIZE 0x00000004 #define NV30_3D_VTXFMT__LEN 0x00000010 diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.h b/src/gallium/drivers/nouveau/nv30/nv30_context.h index 592cdbe24f9..7181336b562 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.h +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.h @@ -51,6 +51,7 @@ struct nv30_context { unsigned rt_enable; unsigned scissor_off; unsigned num_vtxelts; + int index_bias; boolean prim_restart; struct nv30_fragprog *fragprog; } state; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c index d4e384b21d2..faa8812528a 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c @@ -461,13 +461,11 @@ nv30_draw_elements(struct nv30_context *nv30, boolean shorten, struct nouveau_object *eng3d = nv30->screen->eng3d; unsigned prim = nv30_prim_gl(mode); -#if 0 /*XXX*/ - if (index_bias != nv30->state.index_bias) { - BEGIN_NV04(push, NV30_3D(VB_ELEMENT_BASE), 1); + if (eng3d->oclass >= NV40_3D_CLASS && index_bias != nv30->state.index_bias) { + BEGIN_NV04(push, NV40_3D(VB_ELEMENT_BASE), 1); PUSH_DATA (push, index_bias); nv30->state.index_bias = index_bias; } -#endif if (eng3d->oclass == NV40_3D_CLASS && index_size > 1 && nv30->idxbuf.buffer) { |