iris: Fold a condition into no_gpu for consistency
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 24 Jun 2020 14:45:49 +0000 (07:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 4 Sep 2020 15:29:57 +0000 (15:29 +0000)
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192>

src/gallium/drivers/iris/iris_resource.c

index f1040073ed6c72c9cc0e4e4513c19b46877f0f26..734441b8fae852b53839adce30d119310d0c3fe9 100644 (file)
@@ -1868,9 +1868,13 @@ iris_transfer_map(struct pipe_context *ctx,
    if (fmtl->txc == ISL_TXC_ASTC)
       no_gpu = true;
 
    if (fmtl->txc == ISL_TXC_ASTC)
       no_gpu = true;
 
-   if ((map_would_stall ||
-        res->aux.usage == ISL_AUX_USAGE_CCS_E ||
-        res->aux.usage == ISL_AUX_USAGE_GEN12_CCS_E) && !no_gpu) {
+   if (!map_would_stall &&
+       res->aux.usage != ISL_AUX_USAGE_CCS_E &&
+       res->aux.usage != ISL_AUX_USAGE_GEN12_CCS_E) {
+      no_gpu = true;
+   }
+
+   if (!no_gpu) {
       /* If we need a synchronous mapping and the resource is busy, or needs
        * resolving, we copy to/from a linear temporary buffer using the GPU.
        */
       /* If we need a synchronous mapping and the resource is busy, or needs
        * resolving, we copy to/from a linear temporary buffer using the GPU.
        */