| 466 | } |
| 467 | |
| 468 | const VkResult VulkanDevice::createImageView(VkImageView& view, const VkImage& image, const VkImageViewType& viewType, |
| 469 | const VkFormat& format, const VkAllocationCallbacks* allocator) const { |
| 470 | VkImageViewCreateInfo info = {}; |
| 471 | info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; |
| 472 | info.image = image; |
| 473 | info.viewType = viewType; |
| 474 | info.format = format; |
| 475 | info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; |
| 476 | info.subresourceRange.baseMipLevel = 0; |
| 477 | info.subresourceRange.levelCount = 1; |
| 478 | info.subresourceRange.baseArrayLayer = 0; |
| 479 | info.subresourceRange.layerCount = 1; |
| 480 | |
| 481 | return vkCreateImageView(mDevice, &info, allocator, &view); |
| 482 | } |
| 483 | |
| 484 | const void VulkanDevice::destroyImageView(const VkImageView& imageView, const VkAllocationCallbacks* allocator) const { |
| 485 | vkDestroyImageView(mDevice, imageView, allocator); |