Skip to content

Commit 43e4555

Browse files
Create super-resolution factory for Metal device
1 parent 40f9051 commit 43e4555

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,14 @@ elseif(PLATFORM_LINUX)
201201
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Linux platform")
202202
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1)
203203
elseif(PLATFORM_MACOS)
204-
set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform")
205-
set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform")
206-
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on MacOS platform")
204+
set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform")
205+
set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform")
206+
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on MacOS platform")
207+
set(SUPER_RESOLUTION_SUPPORTED TRUE CACHE INTERNAL "Super resolution is supported on MacOS platform")
207208
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_MACOS=1 PLATFORM_APPLE=1)
208209
elseif(PLATFORM_IOS)
209-
set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on iOS platform")
210+
set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on iOS platform")
211+
set(SUPER_RESOLUTION_SUPPORTED TRUE CACHE INTERNAL "Super resolution is supported on iOS platform")
210212
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_IOS=1 PLATFORM_APPLE=1)
211213
elseif(PLATFORM_TVOS)
212214
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_TVOS=1 PLATFORM_APPLE=1)

Graphics/SuperResolution/src/SuperResolutionFactoryBase.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ namespace Diligent
3838
void CreateSuperResolutionFactoryD3D12(IRenderDevice* pDevice, ISuperResolutionFactory** ppFactory);
3939
#endif
4040

41+
#if METAL_SUPPORTED
42+
void CreateSuperResolutionFactoryMtl(IRenderDevice* pDevice, ISuperResolutionFactory** ppFactory);
43+
#endif
44+
4145
SuperResolutionFactoryBase::SuperResolutionFactoryBase(IReferenceCounters* pRefCounters, IRenderDevice* pDevice) :
4246
TBase{pRefCounters},
4347
m_pDevice{pDevice}
@@ -99,6 +103,12 @@ API_QUALIFIER void CreateSuperResolutionFactory(IRenderDevice* pDevice, ISuperRe
99103
#endif
100104
break;
101105

106+
case RENDER_DEVICE_TYPE_METAL:
107+
#if METAL_SUPPORTED
108+
CreateSuperResolutionFactoryMtl(pDevice, ppFactory);
109+
#endif
110+
break;
111+
102112
default:
103113
LOG_ERROR_MESSAGE("Super resolution is not supported on this device type: ", DeviceType);
104114
}

0 commit comments

Comments
 (0)