It's not particularily useful to store commands which are
going to be send few lines after.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
 src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c 
b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index d661c00..d1f0855 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -702,8 +702,6 @@ nve4_compute_validate_textures(struct nvc0_context *nvc0)
    struct nouveau_pushbuf *push = nvc0->base.pushbuf;
    const unsigned s = 5;
    unsigned i;
-   uint32_t commands[2][32];
-   unsigned n[2] = { 0, 0 };
 
    for (i = 0; i < nvc0->num_textures[s]; ++i) {
       struct nv50_tic_entry *tic = nv50_tic_entry(nvc0->textures[s][i]);
@@ -731,10 +729,12 @@ nve4_compute_validate_textures(struct nvc0_context *nvc0)
          PUSH_DATA (push, NVE4_COMPUTE_UPLOAD_EXEC_LINEAR | (0x20 << 1));
          PUSH_DATAp(push, &tic->tic[0], 8);
 
-         commands[0][n[0]++] = (tic->id << 4) | 1;
+         BEGIN_NVC0(push, NVE4_CP(TIC_FLUSH), 1);
+         PUSH_DATA (push, (tic->id << 4) | 1);
       } else
       if (res->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) {
-         commands[1][n[1]++] = (tic->id << 4) | 1;
+         BEGIN_NVC0(push, NVE4_CP(TEX_CACHE_CTL), 1);
+         PUSH_DATA (push, (tic->id << 4) | 1);
       }
       nvc0->screen->tic.lock[tic->id / 32] |= 1 << (tic->id % 32);
 
@@ -751,15 +751,6 @@ nve4_compute_validate_textures(struct nvc0_context *nvc0)
       nvc0->textures_dirty[s] |= 1 << i;
    }
 
-   if (n[0]) {
-      BEGIN_NIC0(push, NVE4_CP(TIC_FLUSH), n[0]);
-      PUSH_DATAp(push, commands[0], n[0]);
-   }
-   if (n[1]) {
-      BEGIN_NIC0(push, NVE4_CP(TEX_CACHE_CTL), n[1]);
-      PUSH_DATAp(push, commands[1], n[1]);
-   }
-
    nvc0->state.num_textures[s] = nvc0->num_textures[s];
 
    /* Invalidate all 3D textures because they are aliased. */
-- 
2.10.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to