Mesa (master): nv50,nvc0: avoid unnecessary flushes

Marcin Åšlusarz mslusarz at kemper.freedesktop.org
Sun Oct 9 07:57:58 PDT 2011


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

Author: Marcin Slusarz <marcin.slusarz at gmail.com>
Date:   Sun Oct  9 00:10:47 2011 +0200

nv50,nvc0: avoid unnecessary flushes

Relocations don't consume pushbuffer space, so there is no need to
ensure there is any space in pushbuffer.

---

 src/gallium/drivers/nv50/nv50_context.c |    2 +-
 src/gallium/drivers/nv50/nv50_screen.c  |    2 +-
 src/gallium/drivers/nvc0/nvc0_context.c |    2 +-
 src/gallium/drivers/nvc0/nvc0_screen.c  |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 0d46406..a48b864 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -205,7 +205,7 @@ nv50_bufctx_emit_relocs(struct nv50_context *nv50)
    n  = nv50->residents_size / sizeof(struct resident);
    n += NV50_SCREEN_RESIDENT_BO_COUNT;
 
-   MARK_RING(nv50->screen->base.channel, n, n);
+   MARK_RING(nv50->screen->base.channel, 0, n);
 
    for (ctx = 0; ctx < NV50_BUFCTX_COUNT; ++ctx) {
       array = &nv50->residents[ctx];
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 7ff11ea..fe8712d 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -641,7 +641,7 @@ nv50_screen_make_buffers_resident(struct nv50_screen *screen)
 
    const unsigned flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;
 
-   MARK_RING(chan, 5, 5);
+   MARK_RING(chan, 0, 5);
    nouveau_bo_validate(chan, screen->code, flags);
    nouveau_bo_validate(chan, screen->uniforms, flags);
    nouveau_bo_validate(chan, screen->txc, flags);
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index 8fa1675..d493d4b 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -209,7 +209,7 @@ nvc0_bufctx_emit_relocs(struct nvc0_context *nvc0)
    n  = nvc0->residents_size / sizeof(struct resident);
    n += NVC0_SCREEN_RESIDENT_BO_COUNT;
 
-   MARK_RING(nvc0->screen->base.channel, n, n);
+   MARK_RING(nvc0->screen->base.channel, 0, n);
 
    for (ctx = 0; ctx < NVC0_BUFCTX_COUNT; ++ctx) {
       array = &nvc0->residents[ctx];
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index 292cbdd..0da7be4 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -659,7 +659,7 @@ nvc0_screen_make_buffers_resident(struct nvc0_screen *screen)
 
    const unsigned flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;
 
-   MARK_RING(chan, 5, 5);
+   MARK_RING(chan, 0, 5);
    nouveau_bo_validate(chan, screen->text, flags);
    nouveau_bo_validate(chan, screen->uniforms, flags);
    nouveau_bo_validate(chan, screen->txc, flags);



More information about the mesa-commit mailing list