mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
freedreno/a4xx: 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 <robclark@freedesktop.org>
This commit is contained in:
parent
6dabf45597
commit
d2f669e6c7
1 changed files with 2 additions and 0 deletions
|
|
@ -396,12 +396,14 @@ fd4_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile)
|
|||
|
||||
if (fd_gmem_needs_restore(ctx, tile, FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) {
|
||||
emit.prog = &ctx->blit_prog[0];
|
||||
emit.fp = NULL; /* frag shader changed so clear cache */
|
||||
fd4_program_emit(ring, &emit, 1, &pfb->zsbuf);
|
||||
emit_mem2gmem_surf(ctx, gmem->zsbuf_base, &pfb->zsbuf, 1, bin_w);
|
||||
}
|
||||
|
||||
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 */
|
||||
fd4_program_emit(ring, &emit, pfb->nr_cbufs, pfb->cbufs);
|
||||
emit_mem2gmem_surf(ctx, gmem->cbuf_base, pfb->cbufs, pfb->nr_cbufs, bin_w);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue