diff --git a/README.md b/README.md index e6ea343..b3a760a 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,4 @@ Repository to accompany the following blog posts: - [Ambient Occlusion in Metal](http://metalkit.org/2017/03/22/ambient-occlusion-in-metal.html) - [Working with memory in Metal](http://metalkit.org/2017/04/30/working-with-memory-in-metal.html) - [Working with memory in Metal part 2](http://metalkit.org/2017/05/26/working-with-memory-in-metal-part-2.html) +- [Introducing Metal 2](http://metalkit.org/2017/06/30/introducing-metal-2.html) diff --git a/metal2/metal2.playground/Contents.swift b/metal2/metal2.playground/Contents.swift new file mode 100644 index 0000000..f270ef8 --- /dev/null +++ b/metal2/metal2.playground/Contents.swift @@ -0,0 +1,22 @@ + +import Metal + +let devices = MTLCopyAllDevices() + +devices[0].name! +devices[0].areRasterOrderGroupsSupported +devices[0].isDepth24Stencil8PixelFormatSupported +devices[0].isLowPower +devices[0].maxThreadsPerThreadgroup.depth +devices[0].maxThreadgroupMemoryLength +devices[0].supportsFeatureSet(MTLFeatureSet.macOS_GPUFamily1_v3) +devices[0].supportsFeatureSet(MTLFeatureSet.macOS_ReadWriteTextureTier2) + +devices[1].name! +devices[1].areRasterOrderGroupsSupported +devices[1].isDepth24Stencil8PixelFormatSupported +devices[1].isLowPower +devices[1].maxThreadsPerThreadgroup.depth +devices[1].maxThreadgroupMemoryLength +devices[1].supportsFeatureSet(MTLFeatureSet.macOS_GPUFamily1_v3) +devices[1].supportsFeatureSet(MTLFeatureSet.macOS_ReadWriteTextureTier2) diff --git a/metal2/metal2.playground/contents.xcplayground b/metal2/metal2.playground/contents.xcplayground new file mode 100644 index 0000000..a93d484 --- /dev/null +++ b/metal2/metal2.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/metal2/metal2.playground/playground.xcworkspace/contents.xcworkspacedata b/metal2/metal2.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ff53674 --- /dev/null +++ b/metal2/metal2.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/metal2/metal2.playground/playground.xcworkspace/xcuserdata/marius.xcuserdatad/UserInterfaceState.xcuserstate b/metal2/metal2.playground/playground.xcworkspace/xcuserdata/marius.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..4f804ab Binary files /dev/null and b/metal2/metal2.playground/playground.xcworkspace/xcuserdata/marius.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/metal2/metal2.playground/timeline.xctimeline b/metal2/metal2.playground/timeline.xctimeline new file mode 100644 index 0000000..9389752 --- /dev/null +++ b/metal2/metal2.playground/timeline.xctimeline @@ -0,0 +1,11 @@ + + + + + + +