aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_image.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-11-21 15:09:02 -0800
committerMarge Bot <[email protected]>2020-02-04 23:18:00 +0000
commit22d2cbe6856fea65bf01dc96941b5127f17dacab (patch)
treeb5e045e6089c00b98d00b8ff482ecf53b5a95700 /src/freedreno/vulkan/tu_image.c
parentecd62ff7665d0a731ead705321e4e1ee0757974d (diff)
freedreno: Allow UBWC on textures with multiple mipmap levels.
This is a backport of Jonathan Marek's UBWC work on turnip to GL. Performance highlights from our trace set (320 frames sampled) traces/glmark2/texture-texture-filter=mipmap.rdc: +9.1% +/- 2.2% traces/android/trex.rdc: +8.7% +/- 0.4% traces/glmark2/desktop-effect=shadow:windows=4.rdc: +4.2% +/- 2.5% Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
Diffstat (limited to 'src/freedreno/vulkan/tu_image.c')
-rw-r--r--src/freedreno/vulkan/tu_image.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index fee74a294c5..4b804ba5c24 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -150,6 +150,8 @@ tu_image_create(VkDevice _device,
/* expect UBWC enabled if we asked for it */
assert(modifier != DRM_FORMAT_MOD_QCOM_COMPRESSED || ubwc_enabled);
+ image->layout.ubwc = ubwc_enabled;
+
fdl6_layout(&image->layout, vk_format_to_pipe_format(image->vk_format),
image->samples,
pCreateInfo->extent.width,
@@ -157,8 +159,7 @@ tu_image_create(VkDevice _device,
pCreateInfo->extent.depth,
pCreateInfo->mipLevels,
pCreateInfo->arrayLayers,
- pCreateInfo->imageType == VK_IMAGE_TYPE_3D,
- ubwc_enabled);
+ pCreateInfo->imageType == VK_IMAGE_TYPE_3D);
*pImage = tu_image_to_handle(image);