this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Implement MTLDevice stubs: Part 1

Thomas A 30d3187a cd8b45db

+105
+89
src/frameworks/Metal/include/Metal/MTLDevice.h
··· 1 + #import <Foundation/Foundation.h> 2 + #import <Metal/MTLTypes.h> 3 + 4 + typedef NS_ENUM(NSUInteger, MTLDeviceLocation) { 5 + MTLDeviceLocationBuiltIn = 0, 6 + MTLDeviceLocationSlot = 1, 7 + MTLDeviceLocationExternal = 2, 8 + MTLDeviceLocationUnspecified = NSUIntegerMax, 9 + }; 10 + 11 + typedef NS_ENUM(NSInteger, MTLGPUFamily) { 12 + MTLGPUFamilyCommon1 = 3001, 13 + MTLGPUFamilyCommon2 = 3002, 14 + MTLGPUFamilyCommon3 = 3003, 15 + MTLGPUFamilyApple1 = 1001, 16 + MTLGPUFamilyApple2 = 1002, 17 + MTLGPUFamilyApple3 = 1003, 18 + MTLGPUFamilyApple4 = 1004, 19 + MTLGPUFamilyApple5 = 1005, 20 + MTLGPUFamilyApple6 = 1006, 21 + MTLGPUFamilyMac1 = 2001, 22 + MTLGPUFamilyMac2 = 2002, 23 + MTLGPUFamilyMacCatalyst1 = 4001, 24 + MTLGPUFamilyMacCatalyst2 = 4002, 25 + }; 26 + 27 + typedef NS_ENUM(NSUInteger, MTLFeatureSet) { 28 + MTLFeatureSet_iOS_GPUFamily1_v1 = 0, 29 + MTLFeatureSet_iOS_GPUFamily1_v2 = 2, 30 + MTLFeatureSet_iOS_GPUFamily1_v3 = 5, 31 + MTLFeatureSet_iOS_GPUFamily1_v4 = 8, 32 + MTLFeatureSet_iOS_GPUFamily1_v5 = 12, 33 + MTLFeatureSet_iOS_GPUFamily2_v1 = 1, 34 + MTLFeatureSet_iOS_GPUFamily2_v2 = 3, 35 + MTLFeatureSet_iOS_GPUFamily2_v3 = 6, 36 + MTLFeatureSet_iOS_GPUFamily2_v4 = 9, 37 + MTLFeatureSet_iOS_GPUFamily2_v5 = 13, 38 + MTLFeatureSet_iOS_GPUFamily3_v1 = 4, 39 + MTLFeatureSet_iOS_GPUFamily3_v2 = 7, 40 + MTLFeatureSet_iOS_GPUFamily3_v3 = 10, 41 + MTLFeatureSet_iOS_GPUFamily3_v4 = 14, 42 + MTLFeatureSet_iOS_GPUFamily4_v1 = 11, 43 + MTLFeatureSet_iOS_GPUFamily4_v2 = 15, 44 + MTLFeatureSet_iOS_GPUFamily5_v1 = 16, 45 + 46 + MTLFeatureSet_macOS_GPUFamily1_v1 = 10000, 47 + MTLFeatureSet_macOS_GPUFamily1_v2 = 10001, 48 + MTLFeatureSet_macOS_GPUFamily1_v3 = 10003, 49 + MTLFeatureSet_macOS_GPUFamily1_v4 = 10004, 50 + MTLFeatureSet_macOS_GPUFamily2_v1 = 10005, 51 + MTLFeatureSet_macOS_ReadWriteTextureTier2 = 10002, 52 + 53 + MTLFeatureSet_tvOS_GPUFamily1_v1 = 30000, 54 + MTLFeatureSet_tvOS_GPUFamily1_v2 = 30001, 55 + MTLFeatureSet_tvOS_GPUFamily1_v3 = 30002, 56 + MTLFeatureSet_tvOS_GPUFamily1_v4 = 30004, 57 + MTLFeatureSet_tvOS_GPUFamily2_v1 = 30003, 58 + MTLFeatureSet_tvOS_GPUFamily2_v2 = 30005, 59 + }; 60 + 61 + 62 + @protocol MTLDevice<NSObject> 63 + 64 + @property(readonly) NSString *name; 65 + @property(readonly, getter=isHeadless) BOOL headless; 66 + @property(readonly, getter=isLowPower) BOOL lowPower; 67 + @property(readonly, getter=isRemovable) BOOL removable; 68 + @property(readonly) uint64_t registryID; 69 + @property(readonly) MTLDeviceLocation location; 70 + @property(readonly) NSUInteger locationNumber; 71 + @property(readonly) uint64_t maxTransferRate; 72 + @property(readonly) BOOL hasUnifiedMemory; 73 + @property(readonly) uint64_t peerGroupID; 74 + @property(readonly) uint32_t peerCount; 75 + @property(readonly) uint32_t peerIndex; 76 + @property(readonly) uint64_t recommendedMaxWorkingSetSize; 77 + @property(readonly) NSUInteger currentAllocatedSize; 78 + @property(readonly) NSUInteger maxThreadgroupMemoryLength; 79 + @property(readonly) MTLSize maxThreadsPerThreadgroup; 80 + @property(readonly, getter=areProgrammableSamplePositionsSupported) BOOL programmableSamplePositionsSupported; 81 + @property(readonly, getter=areRasterOrderGroupsSupported) BOOL rasterOrderGroupsSupported; 82 + @property(readonly, getter=isDepth24Stencil8PixelFormatSupported) BOOL depth24Stencil8PixelFormatSupported; 83 + @property(readonly, getter=areBarycentricCoordsSupported) BOOL barycentricCoordsSupported; 84 + 85 + - (BOOL)supportsFamily:(MTLGPUFamily)gpuFamily; 86 + - (BOOL)supportsFeatureSet:(MTLFeatureSet)featureSet; 87 + - (void)getDefaultSamplePositions:(MTLSamplePosition *)positions count:(NSUInteger)count; 88 + 89 + @end
+14
src/frameworks/Metal/include/Metal/MTLTypes.h
··· 1 + #import <Foundation/Foundation.h> 2 + 3 + typedef struct { 4 + float x; 5 + float y; 6 + } MTLSamplePosition; 7 + 8 + typedef struct { 9 + NSUInteger width; 10 + NSUInteger height; 11 + NSUInteger depth; 12 + } MTLSize; 13 + 14 + MTLSize MTLSizeMake(NSUInteger width, NSUInteger height, NSUInteger depth);
+2
src/frameworks/Metal/include/Metal/Metal.h
··· 136 136 #import <Metal/_MTLCommandQueue.h> 137 137 #import <Metal/MTLCommandQueueDescriptor.h> 138 138 #import <Metal/MTLCommandQueueDescriptorInternal.h> 139 + #import <Metal/MTLDevice.h> 140 + #import <Metal/MTLTypes.h>