iris: Prefer staging blits when destination supports CCS_E.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 24 Apr 2019 00:40:09 +0000 (17:40 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 24 Apr 2019 01:59:27 +0000 (18:59 -0700)
Otherwise our textures don't get color compression.  Thanks to
Eero Tamminen for noticing this was missing!

Improves performance of GLB27_FillTestC24Z16 on my Apollolake
laptop with single channel RAM by 2.3x.

Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
src/gallium/drivers/iris/iris_resource.c

index 0e9e42feaa062d836a1dedfdc11c1ce75461a592..7013d5e89846a89f1d7f961f29aa6bd0c0626db4 100644 (file)
@@ -1443,7 +1443,7 @@ iris_transfer_map(struct pipe_context *ctx,
       no_gpu = true;
    }
 
-   if (map_would_stall && !no_gpu) {
+   if ((map_would_stall || res->aux.usage == ISL_AUX_USAGE_CCS_E) && !no_gpu) {
       /* If we need a synchronous mapping and the resource is busy,
        * we copy to/from a linear temporary buffer using the GPU.
        */