nv50: only flush texture caches on st request
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 23 Jan 2010 17:35:27 +0000 (18:35 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 24 Jan 2010 14:17:53 +0000 (15:17 +0100)
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_tex.c

index 1e697463221c3ecac83e7849da37eead09bf2cb5..e2198b189dad34d575d48b02a0b9dc5c4df95688 100644 (file)
@@ -34,6 +34,11 @@ nv50_flush(struct pipe_context *pipe, unsigned flags,
        struct nv50_context *nv50 = nv50_context(pipe);
        struct nouveau_channel *chan = nv50->screen->base.channel;
 
+       if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+               BEGIN_RING(chan, nv50->screen->tesla, 0x1338, 1);
+               OUT_RING  (chan, 0x20);
+       }
+
        if (flags & PIPE_FLUSH_FRAME)
                FIRE_RING(chan);
 }
index 871536dca9b7a82905997682e7aadd0f8d942a36..9f1a1713032eb23664577ab9861ee447fe6fa415 100644 (file)
@@ -220,11 +220,8 @@ nv50_tex_validate(struct nv50_context *nv50)
                return;
        }
 
-       /* not sure if the following really do what I think: */
        so_method(so, tesla, 0x1330, 1); /* flush TIC */
        so_data  (so, 0);
-       so_method(so, tesla, 0x1338, 1); /* flush texture caches */
-       so_data  (so, 0x20);
 
        so_ref(so, &nv50->state.tic_upload);
        so_ref(NULL, &so);