Mesa (main): iris: Prefer more GPU-based uploads for compression

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 20 00:14:56 UTC 2021


Module: Mesa
Branch: main
Commit: a8b969309308414f6fd9ebc2e7deb33c25b77820
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8b969309308414f6fd9ebc2e7deb33c25b77820

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Fri May 14 07:47:31 2021 -0700

iris: Prefer more GPU-based uploads for compression

Where possible, start compressing depth and stencil resources on upload.
This makes a couple of benchmarks (CS:GO, GFXBench5's gl_alu2_off) start
sampling HiZ buffers in a compressed state instead of the pass-through
state.

Improves the FPS of GFXBench5's gl_alu2_off by 3.14% ±0.52% on TGL.
Testing was done with the performance CI.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2617
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10872>

---

 src/gallium/drivers/iris/iris_resource.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 72419e77730..6e0e1a6bc93 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -2065,8 +2065,7 @@ iris_transfer_map(struct pipe_context *ctx,
       no_gpu = true;
 
    if (!map_would_stall &&
-       res->aux.usage != ISL_AUX_USAGE_CCS_E &&
-       res->aux.usage != ISL_AUX_USAGE_GFX12_CCS_E) {
+       !isl_aux_usage_has_compression(res->aux.usage)) {
       no_gpu = true;
    }
 
@@ -2210,8 +2209,7 @@ iris_texture_subdata(struct pipe_context *ctx,
     * stall-avoidance blits.
     */
    if (surf->tiling == ISL_TILING_LINEAR ||
-       (isl_aux_usage_has_ccs(res->aux.usage) &&
-        res->aux.usage != ISL_AUX_USAGE_CCS_D) ||
+       isl_aux_usage_has_compression(res->aux.usage) ||
        resource_is_busy(ice, res)) {
       return u_default_texture_subdata(ctx, resource, level, usage, box,
                                        data, stride, layer_stride);



More information about the mesa-commit mailing list