Mesa (master): nvc0: replace some vb-> stride checks with constant_vbo instead
Ben Skeggs
darktama at kemper.freedesktop.org
Wed May 14 23:55:04 UTC 2014
Module: Mesa
Branch: master
Commit: 322460fdbc9f966868e72649b12fbc95ab4cfd55
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=322460fdbc9f966868e72649b12fbc95ab4cfd55
Author: Ben Skeggs <bskeggs at redhat.com>
Date: Fri May 9 15:55:51 2014 +1000
nvc0: replace some vb->stride checks with constant_vbo instead
Maxwell no longer has the methods to set constant attributes, and we'll
want to be treating stride 0 vtxbufs the same as for stride > 0.
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
index c05878f..5a65226 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
@@ -240,7 +240,7 @@ nvc0_update_user_vbufs(struct nvc0_context *nvc0)
if (!(nvc0->vbo_user & (1 << b)))
continue;
- if (!vb->stride) {
+ if (nvc0->constant_vbos & (1 << b)) {
nvc0_set_constant_vertex_attrib(nvc0, i);
continue;
}
@@ -331,7 +331,7 @@ nvc0_validate_vertex_buffers(struct nvc0_context *nvc0)
vb = &nvc0->vtxbuf[b];
if (!vb->buffer) {
- if (vb->stride) {
+ if (!(nvc0->constant_vbos & (1 << b))) {
if (ve->pipe.instance_divisor) {
BEGIN_NVC0(push, NVC0_3D(VERTEX_ARRAY_DIVISOR(i)), 1);
PUSH_DATA (push, ve->pipe.instance_divisor);
@@ -385,7 +385,7 @@ nvc0_validate_vertex_buffers_shared(struct nvc0_context *nvc0)
uint32_t offset, limit;
if (mask & (1 << b)) {
- if (vb->stride) {
+ if (!(nvc0->constant_vbos & (1 << b))) {
BEGIN_NVC0(push, NVC0_3D(VERTEX_ARRAY_FETCH(b)), 1);
PUSH_DATA (push, NVC0_3D_VERTEX_ARRAY_FETCH_ENABLE | vb->stride);
}
More information about the mesa-commit
mailing list