diff --git a/shell/openxr/mobile/vulkan/XrSwapchainProviderImplVulkan.cpp b/shell/openxr/mobile/vulkan/XrSwapchainProviderImplVulkan.cpp index 54285eb2d9..794f632b98 100644 --- a/shell/openxr/mobile/vulkan/XrSwapchainProviderImplVulkan.cpp +++ b/shell/openxr/mobile/vulkan/XrSwapchainProviderImplVulkan.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -97,7 +98,7 @@ std::shared_ptr getSurfaceTexture( } const auto& actualDevice = static_cast(device); - const auto iglFormat = vulkan::vkFormatToTextureFormat(externalTextureFormat); + const auto iglFormat = vulkan::util::vkTextureFormatToTextureFormat(externalTextureFormat); const auto texture = inOutTextures[imageIndex]; // allocate new drawable textures if its null or mismatches in size or format if (!texture || swapchainImageInfo.imageWidth != texture->getSize().width || diff --git a/src/igl/vulkan/Common.cpp b/src/igl/vulkan/Common.cpp index 1f72f446e0..76aca6ee17 100644 --- a/src/igl/vulkan/Common.cpp +++ b/src/igl/vulkan/Common.cpp @@ -316,10 +316,6 @@ igl::ColorSpace vkColorSpaceToColorSpace(VkColorSpaceKHR colorSpace) { } } -igl::TextureFormat vkFormatToTextureFormat(VkFormat format) { - return util::vkTextureFormatToTextureFormat(format); -} - VkMemoryPropertyFlags resourceStorageToVkMemoryPropertyFlags(igl::ResourceStorage resourceStorage) { VkMemoryPropertyFlags memFlags{0}; diff --git a/src/igl/vulkan/PlatformDevice.cpp b/src/igl/vulkan/PlatformDevice.cpp index 3f15265525..9551692e07 100644 --- a/src/igl/vulkan/PlatformDevice.cpp +++ b/src/igl/vulkan/PlatformDevice.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #if defined(IGL_ANDROID_HWBUFFER_SUPPORTED) #include @@ -45,7 +46,7 @@ std::shared_ptr PlatformDevice::createTextureFromNativeDepth(uint32_t IGL_ASSERT_MSG(vkTex->getVulkanImage().imageFormat_ != VK_FORMAT_UNDEFINED, "Invalid image format"); - const auto iglFormat = vkFormatToTextureFormat(vkTex->getVulkanImage().imageFormat_); + const auto iglFormat = util::vkTextureFormatToTextureFormat(vkTex->getVulkanImage().imageFormat_); if (!IGL_VERIFY(iglFormat != igl::TextureFormat::Invalid)) { Result::setResult(outResult, Result::Code::RuntimeError, "Invalid surface depth format"); return nullptr; @@ -92,7 +93,7 @@ std::shared_ptr PlatformDevice::createTextureFromNativeDrawable(Result IGL_ASSERT_MSG(vkTex->getVulkanImage().imageFormat_ != VK_FORMAT_UNDEFINED, "Invalid image format"); - const auto iglFormat = vkFormatToTextureFormat(vkTex->getVulkanImage().imageFormat_); + const auto iglFormat = util::vkTextureFormatToTextureFormat(vkTex->getVulkanImage().imageFormat_); if (!IGL_VERIFY(iglFormat != igl::TextureFormat::Invalid)) { Result::setResult(outResult, Result::Code::RuntimeError, "Invalid surface color format"); return nullptr; diff --git a/src/igl/vulkan/VulkanSwapchain.cpp b/src/igl/vulkan/VulkanSwapchain.cpp index 4691115606..75802faa64 100644 --- a/src/igl/vulkan/VulkanSwapchain.cpp +++ b/src/igl/vulkan/VulkanSwapchain.cpp @@ -129,11 +129,11 @@ VulkanSwapchain::VulkanSwapchain(VulkanContext& ctx, uint32_t width, uint32_t he surfaceFormat_ = chooseSwapSurfaceFormat(ctx.deviceSurfaceFormats_, ctx.config_.requestedSwapChainTextureFormat, ctx.config_.swapChainColorSpace); - IGL_LOG_DEBUG( - "Swapchain format: %s; colorSpace: %s\n", - TextureFormatProperties::fromTextureFormat(vkFormatToTextureFormat(surfaceFormat_.format)) - .name, - colorSpaceToString(vkColorSpaceToColorSpace(surfaceFormat_.colorSpace))); + IGL_LOG_DEBUG("Swapchain format: %s; colorSpace: %s\n", + TextureFormatProperties::fromTextureFormat( + util::vkTextureFormatToTextureFormat(surfaceFormat_.format)) + .name, + colorSpaceToString(vkColorSpaceToColorSpace(surfaceFormat_.colorSpace))); IGL_ASSERT_MSG( ctx.vkSurface_ != VK_NULL_HANDLE,