Permalink
Browse files

Vulkan validation: Fix issue where we forgot to transition image mip …

…levels past 0 away from TRANSFER_DST_OPTIMAL during creation.
  • Loading branch information...
hrydgard committed Oct 10, 2018
1 parent 0ad166d commit 505464eaa57da0dc46dd35e539936d404e2d3281
Showing with 1 addition and 1 deletion.
  1. +1 −1 Common/Vulkan/VulkanImage.cpp
@@ -200,7 +200,7 @@ void VulkanTexture::GenerateMip(VkCommandBuffer cmd, int mip) {
}
void VulkanTexture::EndCreate(VkCommandBuffer cmd, bool vertexTexture) {
TransitionImageLayout2(cmd, image_, 0, 1,
TransitionImageLayout2(cmd, image_, 0, numMips_,
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_TRANSFER_BIT, vertexTexture ? VK_PIPELINE_STAGE_VERTEX_SHADER_BIT : VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,

0 comments on commit 505464e

Please sign in to comment.