diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp index a35cf0dba..4a9cb391e 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp @@ -340,7 +340,7 @@ class VkFormatToTexFormatMapper m_VkFmtToTexFmtMap[VK_FORMAT_R64G64B64A64_SINT] = TEX_FORMAT_UNKNOWN; m_VkFmtToTexFmtMap[VK_FORMAT_R64G64B64A64_SFLOAT] = TEX_FORMAT_UNKNOWN; - m_VkFmtToTexFmtMap[VK_FORMAT_B10G11R11_UFLOAT_PACK32] = TEX_FORMAT_UNKNOWN; + m_VkFmtToTexFmtMap[VK_FORMAT_B10G11R11_UFLOAT_PACK32] = TEX_FORMAT_R11G11B10_FLOAT; m_VkFmtToTexFmtMap[VK_FORMAT_E5B9G9R9_UFLOAT_PACK32] = TEX_FORMAT_RGB9E5_SHAREDEXP; m_VkFmtToTexFmtMap[VK_FORMAT_D16_UNORM] = TEX_FORMAT_D16_UNORM; m_VkFmtToTexFmtMap[VK_FORMAT_X8_D24_UNORM_PACK32] = TEX_FORMAT_UNKNOWN; diff --git a/Graphics/GraphicsTools/CMakeLists.txt b/Graphics/GraphicsTools/CMakeLists.txt index 279e1c0eb..ff4e42e72 100644 --- a/Graphics/GraphicsTools/CMakeLists.txt +++ b/Graphics/GraphicsTools/CMakeLists.txt @@ -37,11 +37,6 @@ set(SOURCE src/DynamicTextureArray.cpp src/DynamicTextureAtlas.cpp src/GraphicsUtilities.cpp - src/GraphicsUtilitiesD3D11.cpp - src/GraphicsUtilitiesD3D12.cpp - src/GraphicsUtilitiesGL.cpp - src/GraphicsUtilitiesVk.cpp - src/GraphicsUtilitiesWebGPU.cpp src/OffScreenSwapChain.cpp src/ScopedQueryHelper.cpp src/ScreenCapture.cpp @@ -83,7 +78,7 @@ endif() set(DEPENDENCIES) if(D3D11_SUPPORTED) - list(APPEND SOURCE src/TextureUploaderD3D11.cpp) + list(APPEND SOURCE src/TextureUploaderD3D11.cpp src/GraphicsUtilitiesD3D11.cpp) list(APPEND INTERFACE interface/TextureUploaderD3D11.hpp) list(APPEND DEPENDENCIES Diligent-GraphicsEngineD3D11Interface) if(DILIGENT_USE_OPENXR) @@ -99,30 +94,31 @@ if(D3D12_SUPPORTED) endif() if(VULKAN_SUPPORTED) - list(APPEND DEPENDENCIES Diligent-GraphicsEngineVkInterface Vulkan::Headers) + list(APPEND SOURCE src/GraphicsUtilitiesVk.cpp) + list(APPEND DEPENDENCIES Diligent-GraphicsEngineVk-static Vulkan::Headers) if(DILIGENT_USE_OPENXR) list(APPEND SOURCE src/OpenXRUtilitiesVk.cpp) endif() endif() if(D3D12_SUPPORTED OR VULKAN_SUPPORTED) - list(APPEND SOURCE src/TextureUploaderD3D12_Vk.cpp) + list(APPEND SOURCE src/TextureUploaderD3D12_Vk.cpp src/GraphicsUtilitiesD3D12.cpp) list(APPEND INTERFACE interface/TextureUploaderD3D12_Vk.hpp) endif() if(GL_SUPPORTED OR GLES_SUPPORTED) - list(APPEND SOURCE src/TextureUploaderGL.cpp) + list(APPEND SOURCE src/TextureUploaderGL.cpp src/GraphicsUtilitiesGL.cpp) list(APPEND INTERFACE interface/TextureUploaderGL.hpp) - list(APPEND DEPENDENCIES Diligent-GraphicsEngineOpenGLInterface) + list(APPEND DEPENDENCIES Diligent-GraphicsEngineOpenGL-static) if(DILIGENT_USE_OPENXR) list(APPEND SOURCE src/OpenXRUtilitiesGL.cpp) endif() endif() if(WEBGPU_SUPPORTED) - list(APPEND SOURCE src/TextureUploaderWebGPU.cpp) + list(APPEND SOURCE src/TextureUploaderWebGPU.cpp src/GraphicsUtilitiesWebGPU.cpp) list(APPEND INTERFACE interface/TextureUploaderWebGPU.hpp) - list(APPEND DEPENDENCIES Diligent-GraphicsEngineWebGPUInterface) + list(APPEND DEPENDENCIES Diligent-GraphicsEngineWebGPU-static) if (NOT PLATFORM_EMSCRIPTEN) list(APPEND DEPENDENCIES dawn_proc) endif() diff --git a/Graphics/GraphicsTools/interface/GraphicsUtilities.h b/Graphics/GraphicsTools/interface/GraphicsUtilities.h index f19c48df3..6bc9eb7c8 100644 --- a/Graphics/GraphicsTools/interface/GraphicsUtilities.h +++ b/Graphics/GraphicsTools/interface/GraphicsUtilities.h @@ -212,6 +212,11 @@ IBufferView* DILIGENT_GLOBAL_FUNCTION(GetBufferDefaultUAV)(IObject* pBuffer); /// For other shader types, returns null. const char* DILIGENT_GLOBAL_FUNCTION(GetWebGPUEmulatedArrayIndexSuffix)(IShader* pShader); +/// Returns the native texture format (e.g. DXGI_FORMAT, VkFormat) for the given texture format and device type. +int64_t DILIGENT_GLOBAL_FUNCTION(GetNativeTextureFormat)(TEXTURE_FORMAT TexFormat, enum RENDER_DEVICE_TYPE DeviceType); + +/// Returns the texture format for the given native format (e.g. DXGI_FORMAT, VkFormat) and device type. +TEXTURE_FORMAT DILIGENT_GLOBAL_FUNCTION(GetTextureFormatFromNative)(int64_t NativeFormat, enum RENDER_DEVICE_TYPE DeviceType); #include "../../../Primitives/interface/UndefRefMacro.h" diff --git a/Graphics/GraphicsTools/src/GraphicsUtilities.cpp b/Graphics/GraphicsTools/src/GraphicsUtilities.cpp index ad7d5665f..75e72599d 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilities.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilities.cpp @@ -40,6 +40,31 @@ namespace Diligent { +#if D3D11_SUPPORTED +int64_t GetNativeTextureFormatD3D11(TEXTURE_FORMAT TexFormat); +TEXTURE_FORMAT GetTextureFormatFromNativeD3D11(int64_t NativeFormat); +#endif + +#if D3D12_SUPPORTED +int64_t GetNativeTextureFormatD3D12(TEXTURE_FORMAT TexFormat); +TEXTURE_FORMAT GetTextureFormatFromNativeD3D12(int64_t NativeFormat); +#endif + +#if GL_SUPPORTED || GLES_SUPPORTED +int64_t GetNativeTextureFormatGL(TEXTURE_FORMAT TexFormat); +TEXTURE_FORMAT GetTextureFormatFromNativeGL(int64_t NativeFormat); +#endif + +#if VULKAN_SUPPORTED +int64_t GetNativeTextureFormatVk(TEXTURE_FORMAT TexFormat); +TEXTURE_FORMAT GetTextureFormatFromNativeVk(int64_t NativeFormat); +#endif + +#if WEBGPU_SUPPORTED +int64_t GetNativeTextureFormatWebGPU(TEXTURE_FORMAT TexFormat); +TEXTURE_FORMAT GetTextureFormatFromNativeWebGPU(int64_t NativeFormat); +#endif + void CreateUniformBuffer(IRenderDevice* pDevice, Uint64 Size, const Char* Name, @@ -540,6 +565,85 @@ IBufferView* GetBufferDefaultUAV(IObject* pBuffer) return GetDefaultUAV(static_cast(pBuffer)); } +#if !WEBGPU_SUPPORTED +const char* GetWebGPUEmulatedArrayIndexSuffix(IShader* pShader) +{ + return nullptr; +} +#endif + +int64_t GetNativeTextureFormat(TEXTURE_FORMAT TexFormat, RENDER_DEVICE_TYPE DeviceType) +{ + switch (DeviceType) + { +#if D3D11_SUPPORTED + case RENDER_DEVICE_TYPE_D3D11: + return GetNativeTextureFormatD3D11(TexFormat); +#endif + +#if D3D12_SUPPORTED + case RENDER_DEVICE_TYPE_D3D12: + return GetNativeTextureFormatD3D12(TexFormat); +#endif + +#if GL_SUPPORTED || GLES_SUPPORTED + case RENDER_DEVICE_TYPE_GL: + case RENDER_DEVICE_TYPE_GLES: + return GetNativeTextureFormatGL(TexFormat); +#endif + +#if VULKAN_SUPPORTED + case RENDER_DEVICE_TYPE_VULKAN: + return GetNativeTextureFormatVk(TexFormat); +#endif + +#if WEBGPU_SUPPORTED + case RENDER_DEVICE_TYPE_WEBGPU: + return GetNativeTextureFormatWebGPU(TexFormat); +#endif + + default: + UNSUPPORTED("Unsupported device type"); + return 0; + } +} + +TEXTURE_FORMAT GetTextureFormatFromNative(int64_t NativeFormat, RENDER_DEVICE_TYPE DeviceType) +{ + switch (DeviceType) + { +#if D3D11_SUPPORTED + case RENDER_DEVICE_TYPE_D3D11: + return GetTextureFormatFromNativeD3D11(NativeFormat); +#endif + +#if D3D12_SUPPORTED + case RENDER_DEVICE_TYPE_D3D12: + return GetTextureFormatFromNativeD3D12(NativeFormat); +#endif + +#if GL_SUPPORTED || GLES_SUPPORTED + case RENDER_DEVICE_TYPE_GL: + case RENDER_DEVICE_TYPE_GLES: + return GetTextureFormatFromNativeGL(NativeFormat); +#endif + +#if VULKAN_SUPPORTED + case RENDER_DEVICE_TYPE_VULKAN: + return GetTextureFormatFromNativeVk(NativeFormat); +#endif + +#if WEBGPU_SUPPORTED + case RENDER_DEVICE_TYPE_WEBGPU: + return GetTextureFormatFromNativeWebGPU(NativeFormat); +#endif + + default: + UNSUPPORTED("Unsupported device type"); + return TEX_FORMAT_UNKNOWN; + } +} + } // namespace Diligent @@ -616,4 +720,14 @@ extern "C" { return Diligent::GetWebGPUEmulatedArrayIndexSuffix(pShader); } + + int64_t Diligent_GetNativeTextureFormat(Diligent::TEXTURE_FORMAT TexFormat, Diligent::RENDER_DEVICE_TYPE DeviceType) + { + return Diligent::GetNativeTextureFormat(TexFormat, DeviceType); + } + + Diligent::TEXTURE_FORMAT Diligent_GetTextureFormatFromNative(int64_t NativeFormat, Diligent::RENDER_DEVICE_TYPE DeviceType) + { + return Diligent::GetTextureFormatFromNative(NativeFormat, DeviceType); + } } diff --git a/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D11.cpp b/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D11.cpp index 6dea2a6d8..0e9b3e5ea 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D11.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D11.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Diligent Graphics LLC + * Copyright 2019-2024 Diligent Graphics LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,19 @@ #include "GraphicsUtilities.h" +#include "../../GraphicsEngineD3DBase/include/DXGITypeConversions.hpp" + namespace Diligent { +int64_t GetNativeTextureFormatD3D11(TEXTURE_FORMAT TexFormat) +{ + return static_cast(TexFormatToDXGI_Format(TexFormat)); +} + +TEXTURE_FORMAT GetTextureFormatFromNativeD3D11(int64_t NativeFormat) +{ + return DXGI_FormatToTexFormat(static_cast(NativeFormat)); } + +} // namespace Diligent diff --git a/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D12.cpp b/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D12.cpp index 4f7abad86..307bcc236 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D12.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilitiesD3D12.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Diligent Graphics LLC + * Copyright 2019-2024 Diligent Graphics LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,19 @@ #include "GraphicsUtilities.h" +#include "../../GraphicsEngineD3DBase/include/DXGITypeConversions.hpp" + namespace Diligent { +int64_t GetNativeTextureFormatD3D12(TEXTURE_FORMAT TexFormat) +{ + return static_cast(TexFormatToDXGI_Format(TexFormat)); +} + +TEXTURE_FORMAT GetTextureFormatFromNativeD3D12(int64_t NativeFormat) +{ + return DXGI_FormatToTexFormat(static_cast(NativeFormat)); +} + } // namespace Diligent diff --git a/Graphics/GraphicsTools/src/GraphicsUtilitiesGL.cpp b/Graphics/GraphicsTools/src/GraphicsUtilitiesGL.cpp index 4f7abad86..1053b7e87 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilitiesGL.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilitiesGL.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Diligent Graphics LLC + * Copyright 2019-2024 Diligent Graphics LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,21 @@ #include "GraphicsUtilities.h" +typedef unsigned int GLenum; + namespace Diligent { +GLenum TexFormatToGLInternalTexFormat(TEXTURE_FORMAT TexFormat, Uint32 BindFlags = 0); +TEXTURE_FORMAT GLInternalTexFormatToTexFormat(GLenum GlFormat); + +int64_t GetNativeTextureFormatGL(TEXTURE_FORMAT TexFormat) +{ + return static_cast(TexFormatToGLInternalTexFormat(TexFormat)); +} + +TEXTURE_FORMAT GetTextureFormatFromNativeGL(int64_t NativeFormat) +{ + return GLInternalTexFormatToTexFormat(static_cast(NativeFormat)); +} } // namespace Diligent diff --git a/Graphics/GraphicsTools/src/GraphicsUtilitiesVk.cpp b/Graphics/GraphicsTools/src/GraphicsUtilitiesVk.cpp index 831a5c907..39743cef1 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilitiesVk.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilitiesVk.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Diligent Graphics LLC + * Copyright 2019-2024 Diligent Graphics LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,12 +25,25 @@ */ #include "GraphicsUtilities.h" +#include "DeviceContext.h" #if VULKAN_SUPPORTED # include "../../GraphicsEngineVulkan/include/VulkanUtilities/VulkanHeaders.h" #endif +#include "../../GraphicsEngineVulkan/include/VulkanTypeConversions.hpp" + namespace Diligent { +int64_t GetNativeTextureFormatVk(TEXTURE_FORMAT TexFormat) +{ + return static_cast(TexFormatToVkFormat(TexFormat)); +} + +TEXTURE_FORMAT GetTextureFormatFromNativeVk(int64_t NativeFormat) +{ + return VkFormatToTexFormat(static_cast(NativeFormat)); +} + } // namespace Diligent diff --git a/Graphics/GraphicsTools/src/GraphicsUtilitiesWebGPU.cpp b/Graphics/GraphicsTools/src/GraphicsUtilitiesWebGPU.cpp index 7bce1bc72..47201a94a 100644 --- a/Graphics/GraphicsTools/src/GraphicsUtilitiesWebGPU.cpp +++ b/Graphics/GraphicsTools/src/GraphicsUtilitiesWebGPU.cpp @@ -32,18 +32,31 @@ #include "RefCntAutoPtr.hpp" +enum WGPUTextureFormat : int; + namespace Diligent { +WGPUTextureFormat TextureFormatToWGPUFormat(TEXTURE_FORMAT TexFmt); +TEXTURE_FORMAT WGPUFormatToTextureFormat(WGPUTextureFormat TexFmt); + const char* GetWebGPUEmulatedArrayIndexSuffix(IShader* pShader) { -#if WEBGPU_SUPPORTED if (RefCntAutoPtr pShaderWGPU{pShader, IID_ShaderWebGPU}) { return pShaderWGPU->GetEmulatedArrayIndexSuffix(); } -#endif return nullptr; } +int64_t GetNativeTextureFormatWebGPU(TEXTURE_FORMAT TexFormat) +{ + return static_cast(TextureFormatToWGPUFormat(TexFormat)); +} + +TEXTURE_FORMAT GetTextureFormatFromNativeWebGPU(int64_t NativeFormat) +{ + return WGPUFormatToTextureFormat(static_cast(NativeFormat)); +} + } // namespace Diligent diff --git a/Tests/DiligentCoreTest/src/GraphicsTools/GraphicsUtilitiesTest.cpp b/Tests/DiligentCoreTest/src/GraphicsTools/GraphicsUtilitiesTest.cpp new file mode 100644 index 000000000..8921e585a --- /dev/null +++ b/Tests/DiligentCoreTest/src/GraphicsTools/GraphicsUtilitiesTest.cpp @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Diligent Graphics LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "GraphicsUtilities.h" +#include "GraphicsAccessories.hpp" + +#include + +#include "gtest/gtest.h" + +using namespace Diligent; + +namespace +{ + +TEST(GraphicsUtilitiesTest, GetNativeTextureFormat_GetTextureFormatFromNative) +{ + static_assert(TEX_FORMAT_NUM_FORMATS == 106, "The test below may need to be updated to include new formats"); + + const std::unordered_set SkipFormatsD3D{ + TEX_FORMAT_ETC2_RGB8_UNORM, + TEX_FORMAT_ETC2_RGB8_UNORM_SRGB, + TEX_FORMAT_ETC2_RGB8A1_UNORM, + TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB, + TEX_FORMAT_ETC2_RGBA8_UNORM, + TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB, + }; + + const std::unordered_set SkipFormatsGL{ + TEX_FORMAT_R32_FLOAT_X8X24_TYPELESS, + TEX_FORMAT_X32_TYPELESS_G8X24_UINT, + TEX_FORMAT_R24_UNORM_X8_TYPELESS, + TEX_FORMAT_X24_TYPELESS_G8_UINT, + TEX_FORMAT_A8_UNORM, + TEX_FORMAT_R1_UNORM, + TEX_FORMAT_RG8_B8G8_UNORM, + TEX_FORMAT_G8R8_G8B8_UNORM, + TEX_FORMAT_B5G6R5_UNORM, + TEX_FORMAT_B5G5R5A1_UNORM, + TEX_FORMAT_BGRA8_UNORM, + TEX_FORMAT_BGRX8_UNORM, + TEX_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, + TEX_FORMAT_BGRA8_UNORM_SRGB, + TEX_FORMAT_BGRX8_UNORM_SRGB, + }; + + const std::unordered_set SkipFormatsVk{ + TEX_FORMAT_R32_FLOAT_X8X24_TYPELESS, + TEX_FORMAT_X32_TYPELESS_G8X24_UINT, + TEX_FORMAT_R24_UNORM_X8_TYPELESS, + TEX_FORMAT_X24_TYPELESS_G8_UINT, + TEX_FORMAT_A8_UNORM, + TEX_FORMAT_R1_UNORM, + TEX_FORMAT_RG8_B8G8_UNORM, + TEX_FORMAT_G8R8_G8B8_UNORM, + TEX_FORMAT_BGRX8_UNORM, + TEX_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, + TEX_FORMAT_BGRX8_UNORM_SRGB, + }; + + const std::unordered_set SkipFormatsWebGPU{ + TEX_FORMAT_RGB32_FLOAT, + TEX_FORMAT_RGB32_UINT, + TEX_FORMAT_RGB32_SINT, + TEX_FORMAT_R32_FLOAT_X8X24_TYPELESS, + TEX_FORMAT_X32_TYPELESS_G8X24_UINT, + TEX_FORMAT_R24_UNORM_X8_TYPELESS, + TEX_FORMAT_X24_TYPELESS_G8_UINT, + TEX_FORMAT_A8_UNORM, + TEX_FORMAT_R1_UNORM, + TEX_FORMAT_RG8_B8G8_UNORM, + TEX_FORMAT_G8R8_G8B8_UNORM, + TEX_FORMAT_B5G6R5_UNORM, + TEX_FORMAT_B5G5R5A1_UNORM, + TEX_FORMAT_BGRX8_UNORM, + TEX_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, + TEX_FORMAT_BGRX8_UNORM_SRGB, + }; + + for (int i = 1; i < TEX_FORMAT_NUM_FORMATS; ++i) + { + TEXTURE_FORMAT Fmt = static_cast(i); + const TextureFormatAttribs& FmtAttribs = GetTextureFormatAttribs(Fmt); + if (FmtAttribs.IsTypeless) + continue; + + auto Test = [Fmt, &FmtAttribs](RENDER_DEVICE_TYPE DevType) { + int64_t NativeFmt = GetNativeTextureFormat(Fmt, DevType); + EXPECT_NE(NativeFmt, 0); + TEXTURE_FORMAT FmtFromNative = GetTextureFormatFromNative(NativeFmt, DevType); + EXPECT_EQ(Fmt, FmtFromNative) << "DevType: " << GetRenderDeviceTypeString(DevType) << ", Fmt: " << FmtAttribs.Name; + }; + +#if D3D11_SUPPORTED + if (SkipFormatsD3D.find(Fmt) == SkipFormatsD3D.end()) + { + Test(RENDER_DEVICE_TYPE_D3D11); + } +#endif + +#if D3D12_SUPPORTED + if (SkipFormatsD3D.find(Fmt) == SkipFormatsD3D.end()) + { + Test(RENDER_DEVICE_TYPE_D3D12); + } +#endif + +#if GL_SUPPORTED || GLES_SUPPORTED + if (SkipFormatsGL.find(Fmt) == SkipFormatsGL.end()) + { + Test(RENDER_DEVICE_TYPE_GL); + } +#endif + +#if VULKAN_SUPPORTED + if (SkipFormatsVk.find(Fmt) == SkipFormatsVk.end()) + { + Test(RENDER_DEVICE_TYPE_VULKAN); + } +#endif + +#if WEBGPU_SUPPORTED + if (SkipFormatsWebGPU.find(Fmt) == SkipFormatsWebGPU.end()) + { + Test(RENDER_DEVICE_TYPE_WEBGPU); + } +#endif + } +} + +} // namespace