Mesa (master): radv: Do the sample check for tiling earlier.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 02:15:29 UTC 2020
Module: Mesa
Branch: master
Commit: 9acfbe302265122333d097f51b4eac89ecd0ce24
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9acfbe302265122333d097f51b4eac89ecd0ce24
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Fri Nov 13 02:44:48 2020 +0100
radv: Do the sample check for tiling earlier.
The LINEAR optimization is not allowed for MSAA images.
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7594>
---
src/amd/vulkan/radv_image.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 2bad566d12e..429c3d68467 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -47,6 +47,10 @@ radv_choose_tiling(struct radv_device *device,
return RADEON_SURF_MODE_LINEAR_ALIGNED;
}
+ /* MSAA resources must be 2D tiled. */
+ if (pCreateInfo->samples > 1)
+ return RADEON_SURF_MODE_2D;
+
if (!vk_format_is_compressed(format) &&
!vk_format_is_depth_or_stencil(format)
&& device->physical_device->rad_info.chip_class <= GFX8) {
@@ -59,10 +63,6 @@ radv_choose_tiling(struct radv_device *device,
return RADEON_SURF_MODE_LINEAR_ALIGNED;
}
- /* MSAA resources must be 2D tiled. */
- if (pCreateInfo->samples > 1)
- return RADEON_SURF_MODE_2D;
-
return RADEON_SURF_MODE_2D;
}
More information about the mesa-commit
mailing list