From a8b969309308414f6fd9ebc2e7deb33c25b77820 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Fri, 14 May 2021 07:47:31 -0700 Subject: [PATCH] iris: Prefer more GPU-based uploads for compression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- 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);