diff options
| author | JMC47 <JMC4789@gmail.com> | 2023-08-10 18:36:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-10 18:36:48 -0400 |
| commit | 5512d19d4b66af1f7738cf5df9744e01364ffb11 (patch) | |
| tree | 6a9d958c1306b2d937bea595865f7f2d1896f438 /Source/Core/VideoBackends/Vulkan/VKTexture.cpp | |
| parent | 032c77b462a220016f23c5079e71bb23e0ad2adf (diff) | |
| parent | e892b7f1ac426fdc8a3ac1fa28026b86cc06279b (diff) | |
Merge pull request #12061 from iwubcode/cubemap_backends_only
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKTexture.cpp | 6 |
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; |
