[Mesa-dev] [PATCH 0/9] RadeonSI cache flush optimizations

Nicolai Hähnle nhaehnle at gmail.com
Mon Jun 19 12:49:15 UTC 2017


On 16.06.2017 14:57, Marek Olšák wrote:
> Hi,
> 
> This series:
> - reworks CB (MSAA-only) and DB flushes
> - removes L2 flushes for CP packets and indirect buffers for GFX9
> - enables the constant engine for GFX9 (yay!)
> - removes all flushes and waits from the end of IBs (relying on
>    the kernel fence to do that)
> 
> The rework of CB and DB flushes is the most interesting piece. It
> takes advantage of the fact and DB and CB MSAA rendering is always
> followed by a decompression pass before shader reads except when HTILE
> is TC-compatible, but the infrastructure is there.
> 
> We can use the color/depth_needs_decompression tracking to determine
> exactly when a surface is transitioned from CB/DB writes to shader
> reads and do the cache flush in the decompress function. This has
> the advantage that we don't have to flush DB and CB-MSAA in set_frame-
> buffer_state and memory_barrier.
> 
> For TC-compatible HTILE, the code still marks depth textures as
> needing decompression, but the decompress function will not do any
> decompression, it will only do the cache flush.
> 
> It significantly reduces the number of DB flushes. If an app doesn't
> use depth texturing, the driver never flushes DB. Apps overusing
> memory_barrier(FRAMEBUFFER) will also see a lot fewer DB flushes.
> For example, DeusEx:MD has 10x fewer DB flushes per frame now.
> Not that it helps performance there, but it's good to have it.
> 
> Same for CB MSAA. If the current framebuffer is MSAA, set_framebuffer-
> _state, memory_barrier, and texture_barrier don't flush CB. The CB
> flush is only done after the decompression pass where we are 100% sure
> that TC reads will follow.

This is a nice trick. One small comment on patch #4 and an issue with 
patch #7 and a question of patch #8. Patches 1-6 are

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

> Please review.
> 
> Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list