Mesa (staging/19.1): anv: fix format mapping for depth/stencil formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 18 08:39:58 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 0b1ee72bbc5f4f34e013d408d4d435135016e923
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b1ee72bbc5f4f34e013d408d4d435135016e923

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Thu Jul 18 01:00:11 2019 +0300

anv: fix format mapping for depth/stencil formats

anv_format is supposed to have a pointer back to the associated
VkFormat, we were missed this for depth/stencil formats.

This doesn't fix anything afaict, but will be needed for future
changes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 465de47bad70 ("anv: associate vulkan formats with aspects")
Acked-by: Jason Ekstrand <jason at jlekstrand.net>
(cherry picked from commit 3adc32df922753363d964b637196157587d57565)

---

 src/intel/vulkan/anv_formats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index 341a0a14fd2..6573d3e6bd0 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -69,6 +69,7 @@
            .aspect = VK_IMAGE_ASPECT_DEPTH_BIT, \
          }, \
       }, \
+      .vk_format = __vk_fmt, \
       .n_planes = 1, \
    }
 
@@ -80,6 +81,7 @@
            .aspect = VK_IMAGE_ASPECT_STENCIL_BIT, \
          }, \
       }, \
+      .vk_format = __vk_fmt, \
       .n_planes = 1, \
    }
 
@@ -798,6 +800,7 @@ anv_get_image_format_properties(
    if (format == NULL)
       goto unsupported;
 
+   assert(format->vk_format == info->format);
    format_feature_flags = anv_get_image_format_features(devinfo, info->format,
                                                         format, info->tiling);
 




More information about the mesa-commit mailing list