aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2020-05-12 11:28:51 -0400
committerMarge Bot <[email protected]>2020-05-12 17:25:38 +0000
commitd76e722ed63607ecead2c66ef9f3a37a12b62bab (patch)
tree51408a27af195194fcce7711e0e34114623d8c56 /src
parentf543d87f23555912110e2c0f67a57dcb99d94e08 (diff)
turnip: enable tiling for compressed formats
Now that layout code supports this, we can enable it. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5009>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/vulkan/tu_image.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 45dff2df951..8c0e8c5341f 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -90,12 +90,15 @@ tu_image_create(VkDevice _device,
/* disable tiling when linear is requested and for compressed formats */
if (pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR ||
- modifier == DRM_FORMAT_MOD_LINEAR ||
- vk_format_is_compressed(image->vk_format)) {
+ modifier == DRM_FORMAT_MOD_LINEAR) {
image->layout.tile_mode = TILE6_LINEAR;
ubwc_enabled = false;
}
+ /* don't use UBWC with compressed formats */
+ if (vk_format_is_compressed(image->vk_format))
+ ubwc_enabled = false;
+
/* UBWC can't be used with E5B9G9R9 */
if (image->vk_format == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32)
ubwc_enabled = false;