[Mesa-dev] [PATCH 4/7] nvc0: be smarter when invalidating shader caches

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Oct 25 19:41:13 UTC 2016


MEM_BARRIER seems to be similar to FLUSH, thus bit 0 is for
flushing code while bit 12 is for constant buffers.

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

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index a4a164f..68ce1c0 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -859,7 +859,7 @@ nvc0_program_upload(struct nvc0_context *nvc0, struct nvc0_program *prog)
 #endif
 
    BEGIN_NVC0(nvc0->base.pushbuf, NVC0_3D(MEM_BARRIER), 1);
-   PUSH_DATA (nvc0->base.pushbuf, 0x1011);
+   PUSH_DATA (nvc0->base.pushbuf, 0x1);
 
    return true;
 }
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
index 11fd7eb..08dc568 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
@@ -1004,7 +1004,7 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 
    if (nvc0->cb_dirty) {
       PUSH_SPACE(push, 1);
-      IMMED_NVC0(push, NVC0_3D(MEM_BARRIER), 0x1011);
+      IMMED_NVC0(push, NVC0_3D(MEM_BARRIER), 0x1000);
       nvc0->cb_dirty = false;
    }
 
-- 
2.10.1



More information about the mesa-dev mailing list