@@ -596,50 +596,49 @@ bool CoreChecks::PreCallValidateCreateImage(VkDevice device, const VkImageCreate
596596 }
597597 }
598598
599- const VkPhysicalDeviceLimits *device_limits = &phys_dev_props.limits ;
600599 const VkImageUsageFlags attach_flags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
601600 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
602601 if (pCreateInfo->usage & attach_flags) {
603- if (pCreateInfo->extent .width > device_limits-> maxFramebufferWidth ) {
602+ if (pCreateInfo->extent .width > phys_dev_props. limits . maxFramebufferWidth ) {
604603 skip |= LogError (" VUID-VkImageCreateInfo-usage-00964" , device, create_info_loc.dot (Field::usage),
605604 " (%s) includes a frame buffer attachment bit and image width (%" PRIu32
606605 " ) is greater than maxFramebufferWidth (%" PRIu32 " )." ,
607606 string_VkImageUsageFlags (pCreateInfo->usage ).c_str (), pCreateInfo->extent .width ,
608- device_limits-> maxFramebufferWidth );
607+ phys_dev_props. limits . maxFramebufferWidth );
609608 }
610- if (pCreateInfo->extent .height > device_limits-> maxFramebufferHeight ) {
609+ if (pCreateInfo->extent .height > phys_dev_props. limits . maxFramebufferHeight ) {
611610 skip |= LogError (" VUID-VkImageCreateInfo-usage-00965" , device, create_info_loc.dot (Field::usage),
612611 " (%s) includes a frame buffer attachment bit and image height (%" PRIu32
613612 " ) is greater than maxFramebufferHeight (%" PRIu32 " )." ,
614613 string_VkImageUsageFlags (pCreateInfo->usage ).c_str (), pCreateInfo->extent .height ,
615- device_limits-> maxFramebufferHeight );
614+ phys_dev_props. limits . maxFramebufferHeight );
616615 }
617616 }
618617
619618 if (!enabled_features.fragmentDensityMapOffset && (pCreateInfo->usage & VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT)) {
620619 uint32_t ceiling_width = static_cast <uint32_t >(ceilf (
621- static_cast <float >(device_limits-> maxFramebufferWidth ) /
620+ static_cast <float >(phys_dev_props. limits . maxFramebufferWidth ) /
622621 std::max (static_cast <float >(phys_dev_ext_props.fragment_density_map_props .minFragmentDensityTexelSize .width ), 1 .0f )));
623622 if (pCreateInfo->extent .width > ceiling_width) {
624623 skip |= LogError (
625624 " VUID-VkImageCreateInfo-fragmentDensityMapOffset-06514" , device, create_info_loc.dot (Field::usage),
626625 " includes VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT and image width (%" PRIu32 " ) is greater than %" PRIu32
627626 " .\n "
628627 " This is ceiling value of maxFramebufferWidth (%" PRIu32 " ) / minFragmentDensityTexelSize.width (%" PRIu32 " )." ,
629- pCreateInfo->extent .width , ceiling_width, device_limits-> maxFramebufferWidth ,
628+ pCreateInfo->extent .width , ceiling_width, phys_dev_props. limits . maxFramebufferWidth ,
630629 phys_dev_ext_props.fragment_density_map_props .minFragmentDensityTexelSize .width );
631630 }
632631
633632 uint32_t ceiling_height = static_cast <uint32_t >(ceilf (
634- static_cast <float >(device_limits-> maxFramebufferHeight ) /
633+ static_cast <float >(phys_dev_props. limits . maxFramebufferHeight ) /
635634 std::max (static_cast <float >(phys_dev_ext_props.fragment_density_map_props .minFragmentDensityTexelSize .height ), 1 .0f )));
636635 if (pCreateInfo->extent .height > ceiling_height) {
637636 skip |= LogError (
638637 " VUID-VkImageCreateInfo-fragmentDensityMapOffset-06515" , device, create_info_loc.dot (Field::usage),
639638 " includes VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT and image height (%" PRIu32 " ) is greater than %" PRIu32
640639 " .\n "
641640 " This is ceiling value of maxFramebufferHeight (%" PRIu32 " ) / minFragmentDensityTexelSize.height (%" PRIu32 " )." ,
642- pCreateInfo->extent .height , ceiling_height, device_limits-> maxFramebufferHeight ,
641+ pCreateInfo->extent .height , ceiling_height, phys_dev_props. limits . maxFramebufferHeight ,
643642 phys_dev_ext_props.fragment_density_map_props .minFragmentDensityTexelSize .height );
644643 }
645644 }
0 commit comments