Mesa (master): nvc0: disable xfb's which don't have a stride

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 16 00:53:53 UTC 2020


Module: Mesa
Branch: master
Commit: 784b84d308f51430dbd4d9c58fd598c34c4ceefb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=784b84d308f51430dbd4d9c58fd598c34c4ceefb

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Wed Jan 15 19:46:59 2020 -0500

nvc0: disable xfb's which don't have a stride

No stride / no attributes means that nothing is being written to the
buffer. However it might still prevent primitives from being written out
to the other buffers. Disabling it entirely seems to fix it.

Fixes GTF-GL45.gtf30.GL3Tests.transform_feedback.transform_feedback_overflow

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
index 697bf491a01..774c5648113 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
@@ -315,14 +315,14 @@ nvc0_tfb_validate(struct nvc0_context *nvc0)
       struct nvc0_so_target *targ = nvc0_so_target(nvc0->tfbbuf[b]);
       struct nv04_resource *buf;
 
-      if (!targ) {
+      if (targ && tfb)
+         targ->stride = tfb->stride[b];
+
+      if (!targ || !targ->stride) {
          IMMED_NVC0(push, NVC0_3D(TFB_BUFFER_ENABLE(b)), 0);
          continue;
       }
 
-      if (tfb)
-         targ->stride = tfb->stride[b];
-
       buf = nv04_resource(targ->pipe.buffer);
 
       BCTX_REFN(nvc0->bufctx_3d, 3D_TFB, buf, WR);



More information about the mesa-commit mailing list