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

Author: Rob Clark <[email protected]>
Date:   Sun Aug  9 08:38:25 2015 -0400

freedreno/a3xx: clear cached fp when switching blit prog

For gmem restore (mem2gmem), we swap blit programs, in order to have a
different frag shader for depth vs color restore.  But we weren't
actually clearing the cached fp, so it would not actually change the
frag shader as expected.

Signed-off-by: Rob Clark <[email protected]>

---

 src/gallium/drivers/freedreno/a3xx/fd3_gmem.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c 
b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
index 3024526..9a5b45e 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
@@ -651,6 +651,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct 
fd_tile *tile)
 
        if (fd_gmem_needs_restore(ctx, tile, FD_BUFFER_COLOR)) {
                emit.prog = &ctx->blit_prog[pfb->nr_cbufs - 1];
+               emit.fp = NULL;      /* frag shader changed so clear cache */
                fd3_program_emit(ring, &emit, pfb->nr_cbufs, pfb->cbufs);
                emit_mem2gmem_surf(ctx, gmem->cbuf_base, pfb->cbufs, 
pfb->nr_cbufs, bin_w);
        }
@@ -671,6 +672,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct 
fd_tile *tile)
                                emit.prog = &ctx->blit_zs;
                        emit.key.half_precision = false;
                }
+               emit.fp = NULL;      /* frag shader changed so clear cache */
                fd3_program_emit(ring, &emit, 1, &pfb->zsbuf);
                emit_mem2gmem_surf(ctx, gmem->zsbuf_base, &pfb->zsbuf, 1, 
bin_w);
        }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to