Properly transition image layouts after creation
This commit is contained in:
parent
93b55e7022
commit
9d13316d0c
1 changed files with 2 additions and 0 deletions
|
@ -320,6 +320,8 @@ GFXTexture* GFXVulkan::create_texture(const GFXTextureCreateInfo& info) {
|
|||
|
||||
vkBindImageMemory(device, texture->handle, texture->memory, 0);
|
||||
|
||||
transitionImageLayout(texture->handle, imageFormat, imageAspect, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
||||
|
||||
// create image view
|
||||
VkImageViewCreateInfo viewInfo = {};
|
||||
viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
|
||||
|
|
Reference in a new issue