anv: add VkFormat field as part of anv_format
authorTapani Pälli <tapani.palli@intel.com>
Tue, 13 Nov 2018 07:57:09 +0000 (09:57 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 19 Dec 2018 07:38:41 +0000 (09:38 +0200)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_formats.c
src/intel/vulkan/anv_private.h

index eaab6088a7e0ef84e8d702f7ed3744f1799b3323..eb9893294d172887b1157191d0968a23ef478608 100644 (file)
@@ -54,6 +54,7 @@
            .aspect = VK_IMAGE_ASPECT_COLOR_BIT, \
          }, \
       }, \
+      .vk_format = __vk_fmt, \
       .n_planes = 1, \
    }
 
@@ -94,6 +95,7 @@
            .aspect = VK_IMAGE_ASPECT_STENCIL_BIT, \
          }, \
       }, \
+      .vk_format = __vk_fmt, \
       .n_planes = 2, \
    }
 
       .planes = { \
          { .isl_format = ISL_FORMAT_UNSUPPORTED, }, \
       }, \
+      .vk_format = VK_FORMAT_UNDEFINED, \
    }
 
 #define y_plane(__plane, __hw_fmt, __swizzle, __ycbcr_swizzle, dhs, dvs) \
       .planes = { \
          __VA_ARGS__, \
       }, \
+      .vk_format = __vk_fmt, \
       .n_planes = __n_planes, \
       .can_ycbcr = true, \
    }
index cd24714f93e6b35ba16a2d8efe50d980cab46a8b..903931472dadfe36f24004894cbce3244c5d3c66 100644 (file)
@@ -2555,6 +2555,7 @@ struct anv_format_plane {
 
 struct anv_format {
    struct anv_format_plane planes[3];
+   VkFormat vk_format;
    uint8_t n_planes;
    bool can_ycbcr;
 };