Skip to content
Merged
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
14 changes: 14 additions & 0 deletions src/Metal/MTLArrays.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,19 @@ public MTLPipelineBufferDescriptor this [nuint index]
}
}
}

#if IOS
public partial class MTLTileRenderPipelineColorAttachmentDescriptorArray {
public MTLTileRenderPipelineColorAttachmentDescriptor this [nuint index]
{
get {
return GetObject (index);
}
set {
SetObject (value, index);
}
}
}
#endif
}
#endif
27 changes: 26 additions & 1 deletion src/Metal/MTLEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,23 @@ public enum MTLDataType : nuint {
[Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Texture = 58,
[Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Sampler = 59,
[Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Pointer = 60,

[NoMac, iOS (11,0), NoTV, NoWatch] R8Unorm = 62,
[NoMac, iOS (11,0), NoTV, NoWatch] R8Snorm = 63,
[NoMac, iOS (11,0), NoTV, NoWatch] R16Unorm = 64,
[NoMac, iOS (11,0), NoTV, NoWatch] R16Snorm = 65,
[NoMac, iOS (11,0), NoTV, NoWatch] Rg8Unorm = 66,
[NoMac, iOS (11,0), NoTV, NoWatch] Rg8Snorm = 67,
[NoMac, iOS (11,0), NoTV, NoWatch] Rg16Unorm = 68,
[NoMac, iOS (11,0), NoTV, NoWatch] Rg16Snorm = 69,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Unorm = 70,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Unorm_sRgb = 71,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Snorm = 72,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgba16Unorm = 73,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgba16Snorm = 74,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgb10A2Unorm = 75,
[NoMac, iOS (11,0), NoTV, NoWatch] Rg11B10Float = 76,
[NoMac, iOS (11,0), NoTV, NoWatch] Rgb9E5Float = 77,
}

[Native]
Expand All @@ -605,6 +622,9 @@ public enum MTLArgumentType : nuint {
ThreadgroupMemory= 1,
Texture = 2,
Sampler = 3,

[NoMac, iOS (11,0), NoTV, NoWatch] ImageblockData = 16,
[NoMac, iOS (11,0), NoTV, NoWatch] Imageblock = 17,
}

[Native]
Expand Down Expand Up @@ -637,6 +657,8 @@ public enum MTLFeatureSet : nuint {
iOS_GPUFamily2_v4 = 9,
[iOS (11,0), NoTV, NoWatch, NoMac]
iOS_GPUFamily3_v3 = 10,
[iOS (11,0), NoTV, NoWatch, NoMac]
iOS_GPUFamily4_v1 = 11,

[Mac (10,11), NoiOS, NoTV, NoWatch]
macOS_GPUFamily1_v1 = 10000,
Expand All @@ -661,7 +683,10 @@ public enum MTLFeatureSet : nuint {
TVOS_GPUFamily1_v1 = 30000,

[NoiOS, TV (10,0), NoWatch, NoMac]
tvOS_GPUFamily1_v2 = 30001
tvOS_GPUFamily1_v2 = 30001,

[NoiOS, TV (11,0), NoWatch, NoMac]
tvOS_GPUFamily2_v1 = 30003,
}

[iOS (9,0)][Mac (10,11)]
Expand Down
19 changes: 19 additions & 0 deletions src/Metal/MTLRenderCommandEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ public unsafe static void SetScissorRects (this IMTLRenderCommandEncoder This, M
fixed (void* handle = scissorRects)
This.SetScissorRects ((IntPtr)handle, (nuint)(scissorRects?.Length ?? 0));
}

#if IOS
[iOS (11,0), NoTV, NoMac, NoWatch]
public unsafe static void SetTileBuffers (this IMTLRenderCommandEncoder This, IMTLBuffer[] buffers, nuint[] offsets, NSRange range)
{
fixed (void* handle = offsets)
This.SetTileBuffers (buffers, (IntPtr)handle, range);
}

[iOS (11,0), NoTV, NoMac, NoWatch]
public unsafe static void SetTileSamplerStates (this IMTLRenderCommandEncoder This, IMTLSamplerState[] samplers, float[] lodMinClamps, float[] lodMaxClamps, NSRange range)
{
fixed (void* minHandle = lodMinClamps) {
fixed (void* maxHandle = lodMaxClamps) {
This.SetTileSamplerStates (samplers, (IntPtr)minHandle, (IntPtr)maxHandle, range);
}
}
}
#endif
}
}
#endif
Loading