summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-07-21 19:09:40 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-07-21 19:09:40 -0500
commite892b7f1ac426fdc8a3ac1fa28026b86cc06279b (patch)
treecc63449c3ab8ff924a39f23624bbaa9efddd3279 /Source/Core/VideoBackends/Vulkan
parent2764978bebce9cedf0e329c320951ff0508f7139 (diff)
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKTexture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
index f8923b4edc..e80ce4f2f7 100644
--- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
@@ -70,7 +70,8 @@ std::unique_ptr<VKTexture> VKTexture::Create(const TextureConfig& tex_config, st
VkImageCreateInfo image_info = {VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
nullptr,
- 0,
+ tex_config.IsCubeMap() ? VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT :
+ static_cast<VkImageCreateFlags>(0),
VK_IMAGE_TYPE_2D,
GetVkFormatForHostTextureFormat(tex_config.format),
{tex_config.width, tex_config.height, 1},
@@ -106,7 +107,8 @@ std::unique_ptr<VKTexture> VKTexture::Create(const TextureConfig& tex_config, st
std::unique_ptr<VKTexture> texture = std::make_unique<VKTexture>(
tex_config, alloc, image, name, VK_IMAGE_LAYOUT_UNDEFINED, ComputeImageLayout::Undefined);
- if (!texture->CreateView(VK_IMAGE_VIEW_TYPE_2D_ARRAY))
+ if (!texture->CreateView(tex_config.IsCubeMap() ? VK_IMAGE_VIEW_TYPE_CUBE :
+ VK_IMAGE_VIEW_TYPE_2D_ARRAY))
return nullptr;
return texture;