Create an image view for our depth image
| 1760 | |
| 1761 | // Create an image view for our depth image |
| 1762 | void setupDepthImageView() |
| 1763 | { |
| 1764 | VkImageViewCreateInfo imageViewCreateInfo = VkImageViewCreateInfo(); |
| 1765 | imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; |
| 1766 | imageViewCreateInfo.image = depthImage; |
| 1767 | imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; |
| 1768 | imageViewCreateInfo.format = depthFormat; |
| 1769 | imageViewCreateInfo.subresourceRange |
| 1770 | .aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | |
| 1771 | ((depthFormat == VK_FORMAT_D32_SFLOAT) ? 0 : VK_IMAGE_ASPECT_STENCIL_BIT); |
| 1772 | imageViewCreateInfo.subresourceRange.baseMipLevel = 0; |
| 1773 | imageViewCreateInfo.subresourceRange.levelCount = 1; |
| 1774 | imageViewCreateInfo.subresourceRange.baseArrayLayer = 0; |
| 1775 | imageViewCreateInfo.subresourceRange.layerCount = 1; |
| 1776 | |
| 1777 | // Create the depth image view |
| 1778 | if (vkCreateImageView(device, &imageViewCreateInfo, nullptr, &depthImageView) != VK_SUCCESS) |
| 1779 | { |
| 1780 | vulkanAvailable = false; |
| 1781 | return; |
| 1782 | } |
| 1783 | } |
| 1784 | |
| 1785 | // Create an image for our texture data |
| 1786 | void setupTextureImage() |
nothing calls this directly
no test coverage detected