Skip to content

Commit

Permalink
vulkan: potentially fix validation errors when creating a cubemap can…
Browse files Browse the repository at this point in the history
…vas.
  • Loading branch information
slime73 committed Mar 28, 2024
1 parent b33afc4 commit 302da1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/graphics/vulkan/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ bool Texture::loadVolatile()
viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
viewInfo.image = textureImage;
viewInfo.viewType = Vulkan::getImageViewType(getTextureType());
if (viewInfo.viewType == VK_IMAGE_VIEW_TYPE_CUBE)
viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
viewInfo.format = vulkanFormat.internalFormat;
viewInfo.subresourceRange.aspectMask = imageAspect;
viewInfo.subresourceRange.baseMipLevel = mip + rootView.startMipmap;
Expand Down

0 comments on commit 302da1b

Please sign in to comment.