Mesa (main): anv/image: Use planes[i]->primary_surface.isl.format in check_drm_format_mod

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 17 21:47:45 UTC 2021


Module: Mesa
Branch: main
Commit: 951635dfe7c90cb0c7d91fcc379d336d46ba2ae6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=951635dfe7c90cb0c7d91fcc379d336d46ba2ae6

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jul 21 18:06:14 2021 -0500

anv/image: Use planes[i]->primary_surface.isl.format in check_drm_format_mod

In theory, with linear vs. tiled differences, it could be different
(RGBA vs. RGB etc.) but it won't matter for the two checks we do with
it.  Also, we probably want to be checking the real format here anyway.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023>

---

 src/intel/vulkan/anv_image.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index da6bbe2e46f..2fcf4daafc9 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -979,10 +979,8 @@ check_drm_format_mod(const struct anv_device *device,
 
    for (int i = 0; i < image->n_planes; ++i) {
       const struct anv_image_plane *plane = &image->planes[i];
-      ASSERTED const struct anv_format_plane *plane_format =
-         &image->format->planes[i];
       ASSERTED const struct isl_format_layout *isl_layout =
-         isl_format_get_layout(plane_format->isl_format);
+         isl_format_get_layout(plane->primary_surface.isl.format);
 
       /* Enforced by us, not the Vulkan spec. */
       assert(isl_layout->txc == ISL_TXC_NONE);



More information about the mesa-commit mailing list