sync from mac

This commit is contained in:
connan 2024-12-17 20:35:00 +08:00
parent baca7740d4
commit b56f5d0576
2 changed files with 7 additions and 4 deletions

View File

@ -57,7 +57,7 @@ void RenderAPI_Metal::processDeviceEvent(UnityGfxDeviceEventType type, IUnityInt
}
void RenderAPI_Metal::initSupportFeature()
{
if (@available(iOS 16.0, *))
if (@available(iOS 16.0, macOS 13.0, *))
{
support_features[GraphicsFeature::METAL_FX_SPATIAL_SR] = true;
support_features[GraphicsFeature::METAL_FX_TEMPORAL_SR] = true;
@ -66,7 +66,7 @@ void RenderAPI_Metal::initSupportFeature()
void RenderAPI_Metal::spatialUpScale(void* src, void* data, void* dst)
{
if (@available(iOS 16.0, *))
if (@available(iOS 16.0, macOS 13.0, *))
{
id<MTLTexture> srctex = (__bridge id<MTLTexture>)src;
id<MTLTexture> dsttex = (__bridge id<MTLTexture>)dst;

View File

@ -75,8 +75,11 @@ target("GfxPluginNativeRender")
if has_config("use_metal") then
set_kind("static")
add_defines("SUPPORT_METAL=1")
add_defines("TARGET_OS_IOS=1")
if is_plat("iphoneos") then
add_defines("TARGET_OS_IOS=1")
else
add_defines("UNITY_OSX=1")
end
add_files("./*.mm")
add_frameworks("MetalFX.framework")
end