diff options
author | Christoph Bumiller <[email protected]> | 2011-10-15 12:03:03 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:39 +0200 |
commit | 8bc3a87f4046c995c31a06ee100852c2261625d1 (patch) | |
tree | 215397c66d00fe5c367027c71b00583b09b48c33 /src | |
parent | 6994b57a509cff1a1d0d013c0b175ec4d83117a0 (diff) |
nv50,nvc0: reset per-instance state for inactive vertex elements
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_vbo.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_vbo.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c index 0ce19bec4af..ef01e61172d 100644 --- a/src/gallium/drivers/nv50/nv50_vbo.c +++ b/src/gallium/drivers/nv50/nv50_vbo.c @@ -351,6 +351,10 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50) for (; i < nv50->state.num_vtxelts; ++i) { BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_ATTRIB(i)), 1); OUT_RING (chan, NV50_3D_VERTEX_ATTRIB_INACTIVE); + if (unlikely(nv50->state.instance_elts & (1 << i))) { + BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 1); + OUT_RING (chan, 0); + } BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1); OUT_RING (chan, 0); } diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c index ac778a7491c..50e99ac5df3 100644 --- a/src/gallium/drivers/nvc0/nvc0_vbo.c +++ b/src/gallium/drivers/nvc0/nvc0_vbo.c @@ -327,6 +327,8 @@ nvc0_vertex_arrays_validate(struct nvc0_context *nvc0) for (; i < nvc0->state.num_vtxelts; ++i) { BEGIN_RING(chan, RING_3D(VERTEX_ATTRIB_FORMAT(i)), 1); OUT_RING (chan, NVC0_3D_VERTEX_ATTRIB_INACTIVE); + if (unlikely(nvc0->state.instance_elts & (1 << i))) + IMMED_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 0); BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1); OUT_RING (chan, 0); } |