Mesa (master): turnip: disable 8x msaa

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 9 15:06:21 UTC 2020


Module: Mesa
Branch: master
Commit: 0637eab6780b98f727ecad3be15011324b2894f5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0637eab6780b98f727ecad3be15011324b2894f5

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Tue Apr  7 22:20:10 2020 -0400

turnip: disable 8x msaa

Not everything supports 8x msaa, and the blob doesn't support it at all.

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3783>

---

 src/freedreno/vulkan/tu_device.c  | 4 ++--
 src/freedreno/vulkan/tu_formats.c | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index ffadb3ce6b9..394c3ce1800 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -729,8 +729,8 @@ tu_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
                                VkPhysicalDeviceProperties *pProperties)
 {
    TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
-   VkSampleCountFlags sample_counts = VK_SAMPLE_COUNT_1_BIT |
-      VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT;
+   VkSampleCountFlags sample_counts =
+      VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT;
 
    /* make sure that the entire descriptor set is addressable with a signed
     * 32-bit int. So the sum of all limits scaled by descriptor size has to
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c
index 021618ee8f4..0d2351d0066 100644
--- a/src/freedreno/vulkan/tu_formats.c
+++ b/src/freedreno/vulkan/tu_formats.c
@@ -921,9 +921,10 @@ tu_get_image_format_properties(
        !(info->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
        !(info->usage & VK_IMAGE_USAGE_STORAGE_BIT)) {
       sampleCounts |= VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT;
-      /* 8x MSAA on 128bpp formats doesn't seem to work */
-      if (vk_format_get_blocksize(info->format) <= 8)
-         sampleCounts |= VK_SAMPLE_COUNT_8_BIT;
+      /* note: most operations support 8 samples (GMEM render/resolve do at least)
+       * but some do not (which ones?), just disable 8 samples completely,
+       * (no 8x msaa matches the blob driver behavior)
+       */
    }
 
    if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {



More information about the mesa-commit mailing list