added metal2

This commit is contained in:
Marius Horga 2017-06-30 23:26:13 -05:00
parent 156f1030eb
commit ae2a70c7b7
6 changed files with 45 additions and 0 deletions

View File

@ -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)

View File

@ -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)

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='macos' executeOnSourceChanges='false'>
<timeline fileName='timeline.xctimeline'/>
</playground>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:../metal2.playground">
</FileRef>
</Workspace>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Timeline
version = "3.0">
<TimelineItems>
<LoggerValueHistoryTimelineItem
documentLocation = "file:///Users/marius/Desktop/metal2.playground#CharacterRangeLen=0&amp;CharacterRangeLoc=0&amp;EndingColumnNumber=0&amp;EndingLineNumber=0&amp;StartingColumnNumber=0&amp;StartingLineNumber=0&amp;Timestamp=520575694.983919"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
</TimelineItems>
</Timeline>