From: Emma Anholt Date: Wed, 27 Jul 2022 18:59:22 +0000 (-0700) Subject: zink: Take the tiling path for resources with modifiers. X-Git-Tag: upstream/22.3.5~5148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01ce65da72a88335b4d701d3f086482d19d2c642;p=platform%2Fupstream%2Fmesa.git zink: Take the tiling path for resources with modifiers. transfer_map (the only consumer of the flag now) was doing direct mapping on resources with modifiers (UBWC compressed images on turnip) and accessing them as linear. We definitely want the staging blit path instead. Fixes glReadPixels() from gbm surfaces on turnip. Reviewed-by: Mike Blumenkrantz Part-of: --- diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 74c1c0f..fe2e0e3 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -737,7 +737,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t } if (optimal_tiling) - *optimal_tiling = ici.tiling == VK_IMAGE_TILING_OPTIMAL; + *optimal_tiling = ici.tiling != VK_IMAGE_TILING_LINEAR; if (ici.usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) obj->transfer_dst = true;