| 1520 | } |
| 1521 | |
| 1522 | VkImageAspectFlags Image::AspectMask(VkFormat format) { |
| 1523 | VkImageAspectFlags image_aspect; |
| 1524 | if (vkuFormatIsDepthAndStencil(format)) { |
| 1525 | image_aspect = VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_DEPTH_BIT; |
| 1526 | } else if (vkuFormatIsDepthOnly(format)) { |
| 1527 | image_aspect = VK_IMAGE_ASPECT_DEPTH_BIT; |
| 1528 | } else if (vkuFormatIsStencilOnly(format)) { |
| 1529 | image_aspect = VK_IMAGE_ASPECT_STENCIL_BIT; |
| 1530 | } else { // color |
| 1531 | image_aspect = VK_IMAGE_ASPECT_COLOR_BIT; |
| 1532 | } |
| 1533 | return image_aspect; |
| 1534 | } |
| 1535 | |
| 1536 | VkImageMemoryBarrier Image::LayoutTransitionBarrier(VkImageLayout old_layout, VkImageLayout new_layout, |
| 1537 | const VkImageSubresourceRange& range) const { |
no outgoing calls
no test coverage detected