diff options
author | Marek Olšák <[email protected]> | 2019-06-28 20:31:41 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-09 17:24:16 -0400 |
commit | 5b50fb9b7f33a5acb5409b5e363a290ba856d509 (patch) | |
tree | 3629683817629653a98363adf4df419c5975b5ba | |
parent | fbf781e401ca648a2fcad6dd3bbd2bca28466b85 (diff) |
radeonsi/gfx10: no need to invalidate L2 for framebuffer -> texture coherency
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Acked-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 01a0ede4126..c63837e89fa 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -1681,7 +1681,10 @@ si_make_CB_shader_coherent(struct si_context *sctx, unsigned num_samples, sctx->flags |= SI_CONTEXT_FLUSH_AND_INV_CB | SI_CONTEXT_INV_VCACHE; - if (sctx->chip_class >= GFX9) { + if (sctx->chip_class >= GFX10) { + if (shaders_read_metadata) + sctx->flags |= SI_CONTEXT_INV_L2_METADATA; + } else if (sctx->chip_class == GFX9) { /* Single-sample color is coherent with shaders on GFX9, but * L2 metadata must be flushed if shaders read metadata. * (DCC, CMASK). @@ -1704,7 +1707,10 @@ si_make_DB_shader_coherent(struct si_context *sctx, unsigned num_samples, sctx->flags |= SI_CONTEXT_FLUSH_AND_INV_DB | SI_CONTEXT_INV_VCACHE; - if (sctx->chip_class >= GFX9) { + if (sctx->chip_class >= GFX10) { + if (shaders_read_metadata) + sctx->flags |= SI_CONTEXT_INV_L2_METADATA; + } else if (sctx->chip_class == GFX9) { /* Single-sample depth (not stencil) is coherent with shaders * on GFX9, but L2 metadata must be flushed if shaders read * metadata. |