[Mesa-dev] [PATCH 2/2] nv50/nvc0: force cache flush for constbufs

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jul 14 03:57:27 PDT 2015


This fixes the following piglit test:
  ext_transform_feedback-immediate-reuse-uniform-buffer

I didn't test on nvc0 but this should work as expected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/nouveau/nv50/nv50_shader_state.c   | 2 ++
 src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
index c698782..932d1c3 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
@@ -108,6 +108,8 @@ nv50_constbufs_validate(struct nv50_context *nv50)
          }
       }
    }
+
+   nv50->cb_dirty = 1; /* Force cache flush for constbufs */
 }
 
 static boolean
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
index 785e52e..f8a30f2 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
@@ -464,6 +464,8 @@ nvc0_constbufs_validate(struct nvc0_context *nvc0)
          }
       }
    }
+
+   nvc0->cb_dirty = 1; /* Force cache flush for constbufs */
 }
 
 static void
-- 
2.4.5



More information about the mesa-dev mailing list