@@ -311,19 +311,19 @@ bool CoreChecks::HasExternalMemoryImportSupport(const vvl::Image& image, VkExter
311311 // TODO - Want to use vvl::PnextChainExtract, but would need to cleanup (and test) rest of how we add the other pNext here
312312 // Note - some pNext structs that can be found in VkImageCreateInfo::pNext are not allowed in VkPhysicalDeviceImageFormatInfo2
313313 VkImageFormatListCreateInfo format_list = vku::InitStructHelper ();
314- if (auto original_format_list = vku::FindStructInPNextChain<VkImageFormatListCreateInfo>(image.create_info . pNext )) {
314+ if (auto original_format_list = vku::FindStructInPNextChain<VkImageFormatListCreateInfo>(image.GetPNext () )) {
315315 format_list.pViewFormats = original_format_list->pViewFormats ;
316316 format_list.viewFormatCount = original_format_list->viewFormatCount ;
317317 vvl::PnextChainAdd (&external_info, &format_list);
318318 }
319319 VkImageStencilUsageCreateInfo stencil_usage = vku::InitStructHelper ();
320- if (auto original_stencil_usage = vku::FindStructInPNextChain<VkImageStencilUsageCreateInfo>(image.create_info . pNext )) {
320+ if (auto original_stencil_usage = vku::FindStructInPNextChain<VkImageStencilUsageCreateInfo>(image.GetPNext () )) {
321321 stencil_usage.stencilUsage = original_stencil_usage->stencilUsage ;
322322 vvl::PnextChainAdd (&external_info, &stencil_usage);
323323 }
324324 VkPhysicalDeviceImageViewImageFormatInfoEXT image_view_format = vku::InitStructHelper ();
325325 if (auto original_image_view_format =
326- vku::FindStructInPNextChain<VkPhysicalDeviceImageViewImageFormatInfoEXT>(image.create_info . pNext )) {
326+ vku::FindStructInPNextChain<VkPhysicalDeviceImageViewImageFormatInfoEXT>(image.GetPNext () )) {
327327 image_view_format.imageViewType = original_image_view_format->imageViewType ;
328328 vvl::PnextChainAdd (&external_info, &image_view_format);
329329 }
@@ -1187,7 +1187,7 @@ bool CoreChecks::PreCallValidateGetImageMemoryRequirements2(VkDevice device, con
11871187
11881188 auto image_state = Get<vvl::Image>(pInfo->image );
11891189 ASSERT_AND_RETURN_SKIP (image_state);
1190- const VkFormat image_format = image_state->create_info . format ;
1190+ const VkFormat image_format = image_state->GetFormat () ;
11911191 const VkImageTiling image_tiling = image_state->GetTiling ();
11921192 const auto * image_plane_info = vku::FindStructInPNextChain<VkImagePlaneMemoryRequirementsInfo>(pInfo->pNext );
11931193 if (!image_plane_info && image_state->disjoint ) {
@@ -1956,7 +1956,7 @@ bool CoreChecks::ValidateBindImageMemory(uint32_t bindInfoCount, const VkBindIma
19561956 if (!image_state || !image_state->disjoint ) {
19571957 continue ;
19581958 }
1959- const uint32_t total_planes = vkuFormatPlaneCount (image_state->create_info . format );
1959+ const uint32_t total_planes = vkuFormatPlaneCount (image_state->GetFormat () );
19601960 for (uint32_t i = 0 ; i < total_planes; i++) {
19611961 if (resource.second [i] == vvl::kNoIndex32 ) {
19621962 skip |= LogError (" VUID-vkBindImageMemory2-pBindInfos-02858" , resource.first , error_obj.location ,
@@ -2086,20 +2086,19 @@ bool CoreChecks::ValidateBindImageMemoryResource(const VkBindImageMemoryInfo& bi
20862086 // TODO - Want to use vvl::PnextChainExtract, but would need to cleanup (and test) rest of how we add the other
20872087 // pNext here
20882088 VkImageFormatListCreateInfo format_list = vku::InitStructHelper ();
2089- if (auto original_format_list = vku::FindStructInPNextChain<VkImageFormatListCreateInfo>(image_state.create_info . pNext )) {
2089+ if (auto original_format_list = vku::FindStructInPNextChain<VkImageFormatListCreateInfo>(image_state.GetPNext () )) {
20902090 format_list.pViewFormats = original_format_list->pViewFormats ;
20912091 format_list.viewFormatCount = original_format_list->viewFormatCount ;
20922092 vvl::PnextChainAdd (&image_format_info, &format_list);
20932093 }
20942094 VkImageStencilUsageCreateInfo stencil_usage = vku::InitStructHelper ();
2095- if (auto original_stencil_usage =
2096- vku::FindStructInPNextChain<VkImageStencilUsageCreateInfo>(image_state.create_info .pNext )) {
2095+ if (auto original_stencil_usage = vku::FindStructInPNextChain<VkImageStencilUsageCreateInfo>(image_state.GetPNext ())) {
20972096 stencil_usage.stencilUsage = original_stencil_usage->stencilUsage ;
20982097 vvl::PnextChainAdd (&image_format_info, &stencil_usage);
20992098 }
21002099 VkPhysicalDeviceImageViewImageFormatInfoEXT image_view_format = vku::InitStructHelper ();
21012100 if (auto original_image_view_format =
2102- vku::FindStructInPNextChain<VkPhysicalDeviceImageViewImageFormatInfoEXT>(image_state.create_info . pNext )) {
2101+ vku::FindStructInPNextChain<VkPhysicalDeviceImageViewImageFormatInfoEXT>(image_state.GetPNext () )) {
21032102 image_view_format.imageViewType = original_image_view_format->imageViewType ;
21042103 vvl::PnextChainAdd (&image_format_info, &image_view_format);
21052104 }
@@ -2592,8 +2591,8 @@ bool CoreChecks::ValidateSparseMemoryBind(const VkSparseMemoryBind& bind, const
25922591bool CoreChecks::ValidateImageSubresourceSparseImageMemoryBind (vvl::Image const & image_state, VkImageSubresource const & subresource,
25932592 const Location& bind_loc, const Location& subresource_loc) const {
25942593 bool skip = false ;
2595- skip |= ValidateImageAspectMask (image_state.VkHandle (), image_state.create_info . format , subresource.aspectMask ,
2596- image_state. disjoint , bind_loc, " VUID-VkSparseImageMemoryBindInfo-subresource-01106" );
2594+ skip |= ValidateImageAspectMask (image_state.VkHandle (), image_state.GetFormat () , subresource.aspectMask , image_state. disjoint ,
2595+ bind_loc, " VUID-VkSparseImageMemoryBindInfo-subresource-01106" );
25972596
25982597 if (subresource.mipLevel >= image_state.GetMipLevels ()) {
25992598 skip |=
0 commit comments