Skip to content

iris: Fix a fast-clear skipping optimization

Nanley Chery requested to merge nchery/mesa:fix/fast-clear-skip into master

Simple Piglit Reproducer

piglit!398 (merged)

Commit Message

When support for multi-slice fast-clears was introduced for color surfaces, an existing optimization for skipping fast-clears was not updated (this optimization assumed single-slice fast-clears). As a result, the driver began to skip multi-layer fast-clears if just the first slice was in the CLEAR state (ignoring the state of the others).

A Civilization VI trace was the only workload I found to make use of this optimization and it did so for 2D, non-array textures. Therefore, this fix simply checks that the depth of the clear box is 1. It also moves the single-slice aux-state query closer to the optimization to clarify the need for the depth check.

Enables iris to pass a case of the fcc-write-after-clear piglit test, [fast-clear tracking across layers 0 -> 1 -> (0,1)].

Fixes: 393f659e ("iris: Enable fast clears on other miplevels and layers than 0.")

Merge request reports