Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
2B6899B81CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */; };
2B6899B91CF8396700C4BA4F /* RenderAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */; };
2B6899BA1CF8396700C4BA4F /* RenderingPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */; };
2B6899C91CF83DB000C4BA4F /* RenderingPlugin.bundle in Copy Bundle into Unity project */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* RenderingPlugin.bundle */; };
2B6899CB1CF8409A00C4BA4F /* RenderAPI_Metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */; };
2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */; };
8A0E9E8B3022106C005CEB36 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A0E9E8A3022106C005CEB36 /* Metal.framework */; };
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
/* End PBXBuildFile section */

Expand All @@ -33,9 +32,6 @@
/* Begin PBXFileReference section */
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
2B6899AB1CF8396700C4BA4F /* PlatformBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformBase.h; path = ../../source/PlatformBase.h; sourceTree = "<group>"; };
2B6899AD1CF8396700C4BA4F /* RenderAPI_D3D11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_D3D11.cpp; path = ../../source/RenderAPI_D3D11.cpp; sourceTree = "<group>"; };
2B6899AE1CF8396700C4BA4F /* RenderAPI_D3D12.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_D3D12.cpp; path = ../../source/RenderAPI_D3D12.cpp; sourceTree = "<group>"; };
2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_OpenGLCoreES.cpp; path = ../../source/RenderAPI_OpenGLCoreES.cpp; sourceTree = "<group>"; };
2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI.cpp; path = ../../source/RenderAPI.cpp; sourceTree = "<group>"; };
2B6899B21CF8396700C4BA4F /* RenderAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderAPI.h; path = ../../source/RenderAPI.h; sourceTree = "<group>"; };
2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderingPlugin.cpp; path = ../../source/RenderingPlugin.cpp; sourceTree = "<group>"; };
Expand All @@ -46,7 +42,7 @@
2B6899C61CF839A600C4BA4F /* IUnityGraphicsMetal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IUnityGraphicsMetal.h; path = ../../source/Unity/IUnityGraphicsMetal.h; sourceTree = "<group>"; };
2B6899C71CF839A600C4BA4F /* IUnityInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IUnityInterface.h; path = ../../source/Unity/IUnityInterface.h; sourceTree = "<group>"; };
2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RenderAPI_Metal.mm; path = ../../source/RenderAPI_Metal.mm; sourceTree = "<group>"; };
2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
8A0E9E8A3022106C005CEB36 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
8D576316048677EA00EA77CD /* RenderingPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RenderingPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -56,8 +52,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8A0E9E8B3022106C005CEB36 /* Metal.framework in Frameworks */,
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -71,6 +67,7 @@
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
19C28FB6FE9D52B211CA2CBB /* Products */,
8A0E9E893022106C005CEB36 /* Frameworks */,
);
name = RenderingPlugin;
sourceTree = "<group>";
Expand All @@ -79,7 +76,6 @@
isa = PBXGroup;
children = (
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
Expand All @@ -97,10 +93,7 @@
children = (
2B6899BC1CF8398200C4BA4F /* Unity */,
2B6899AB1CF8396700C4BA4F /* PlatformBase.h */,
2B6899AD1CF8396700C4BA4F /* RenderAPI_D3D11.cpp */,
2B6899AE1CF8396700C4BA4F /* RenderAPI_D3D12.cpp */,
2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */,
2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */,
2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */,
2B6899B21CF8396700C4BA4F /* RenderAPI.h */,
2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */,
Expand Down Expand Up @@ -129,6 +122,14 @@
name = Unity;
sourceTree = "<group>";
};
8A0E9E893022106C005CEB36 /* Frameworks */ = {
isa = PBXGroup;
children = (
8A0E9E8A3022106C005CEB36 /* Metal.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -194,7 +195,6 @@
buildActionMask = 2147483647;
files = (
2B6899BA1CF8396700C4BA4F /* RenderingPlugin.cpp in Sources */,
2B6899B81CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp in Sources */,
2B6899B91CF8396700C4BA4F /* RenderAPI.cpp in Sources */,
2B6899CB1CF8409A00C4BA4F /* RenderAPI_Metal.mm in Sources */,
);
Expand All @@ -214,9 +214,10 @@
HEADER_SEARCH_PATHS = ../;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 13.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}";
PRODUCT_NAME = RenderingPlugin;
VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
Expand All @@ -231,9 +232,10 @@
HEADER_SEARCH_PATHS = ../;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 13.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}";
PRODUCT_NAME = RenderingPlugin;
VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = bundle;
};
name = Release;
Expand All @@ -245,7 +247,7 @@
ENABLE_TESTABILITY = YES;
GCC_OPTIMIZATION_LEVEL = 0;
MACOSX_DEPLOYMENT_TARGET = 10.11;
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx;
SYMROOT = ../../build;
};
Expand All @@ -258,6 +260,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
SDKROOT = macosx;
SYMROOT = ../../build;
ONLY_ACTIVE_ARCH = NO;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions PluginSource/source/PlatformBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
#define SUPPORT_OPENGL_UNIFIED 1
#define SUPPORT_OPENGL_CORE 1
#define SUPPORT_VULKAN 0 // Requires Vulkan SDK to be installed
#elif UNITY_IOS || UNITY_TVOS || UNITY_ANDROID || UNITY_WEBGL
#elif UNITY_ANDROID || UNITY_WEBGL
#ifndef SUPPORT_OPENGL_ES
#define SUPPORT_OPENGL_ES 1
#endif
#define SUPPORT_OPENGL_UNIFIED SUPPORT_OPENGL_ES
#ifndef SUPPORT_VULKAN
#define SUPPORT_VULKAN 0
#endif
#elif UNITY_OSX || UNITY_LINUX
#elif UNITY_LINUX
#define SUPPORT_OPENGL_UNIFIED 1
#define SUPPORT_OPENGL_CORE 1
#elif UNITY_EMBEDDED_LINUX
Expand Down
10 changes: 6 additions & 4 deletions PluginSource/source/RenderAPI_Metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
pipeDesc.depthAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8;
pipeDesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8;

pipeDesc.sampleCount = 1;
pipeDesc.colorAttachments[0].blendingEnabled = NO;

pipeDesc.vertexFunction = vertexFunction;
Expand Down Expand Up @@ -199,8 +198,10 @@
::memcpy(m_ConstantBuffer.contents, worldMatrix, cbSize);

#if UNITY_OSX
[m_VertexBuffer didModifyRange:NSMakeRange(0, vbSize)];
[m_ConstantBuffer didModifyRange:NSMakeRange(0, cbSize)];
if (m_VertexBuffer.storageMode == MTLStorageModeManaged)
[m_VertexBuffer didModifyRange:NSMakeRange(0, vbSize)];
if (m_ConstantBuffer.storageMode == MTLStorageModeManaged)
[m_ConstantBuffer didModifyRange:NSMakeRange(0, cbSize)];
#endif

id<MTLRenderCommandEncoder> cmd = (id<MTLRenderCommandEncoder>)m_MetalGraphics->CurrentCommandEncoder();
Expand Down Expand Up @@ -250,7 +251,8 @@
{
# if UNITY_OSX
id<MTLBuffer> buf = (__bridge id<MTLBuffer>)bufferHandle;
[buf didModifyRange:NSMakeRange(0, buf.length)];
if (buf.storageMode == MTLStorageModeManaged)
[buf didModifyRange:NSMakeRange(0, buf.length)];
# endif // if UNITY_OSX
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18G87</string>
<string>25F84</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -47,16 +47,20 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10G8</string>
<string>25F70</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<string>26.5</string>
<key>DTSDKBuild</key>
<string>18G74</string>
<string>25F70</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx26.5</string>
<key>DTXcode</key>
<string>1030</string>
<string>2660</string>
<key>DTXcodeBuild</key>
<string>10G8</string>
<string>17F113</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
</dict>
</plist>

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.