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
60 changes: 60 additions & 0 deletions src/Metal/MTLEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,18 @@ public enum MTLPixelFormat : ulong {
/// <summary>Indicates a 5-bit B, 6-bit G, 5-bit R, and 1-bit Alpha unnormalized signed integer format.</summary>
[MacCatalyst (13, 1)]
BGR5A1Unorm = 43,
/// <summary>A three-channel, 8-bit-per-channel normalized unsigned integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB8Unorm = 45,
/// <summary>A three-channel, 8-bit-per-channel normalized signed integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
Comment on lines +437 to +441
RGB8Snorm = 46,
/// <summary>A three-channel, 8-bit-per-channel unsigned integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB8Uint = 47,
/// <summary>A three-channel, 8-bit-per-channel signed integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB8Sint = 48,
/// <summary>Indicates a single 32-bit unsigned integer format.</summary>
R32Uint = 53,
/// <summary>Indicates a single 32-bit signed integer format.</summary>
Expand Down Expand Up @@ -475,6 +487,21 @@ public enum MTLPixelFormat : ulong {
/// <summary>Indicates a 10-bit B, 10-bit G, 10-bit R, and 2-bit Alpha normalized unsigned integer format.</summary>
[MacCatalyst (13, 1)]
BGR10A2Unorm = 94,
/// <summary>A three-channel, 16-bit-per-channel normalized unsigned integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB16Unorm = 95,
/// <summary>A three-channel, 16-bit-per-channel normalized signed integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB16Snorm = 96,
/// <summary>A three-channel, 16-bit-per-channel unsigned integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB16Uint = 97,
/// <summary>A three-channel, 16-bit-per-channel signed integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB16Sint = 98,
/// <summary>A three-channel, 16-bit-per-channel floating-point RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB16Float = 99,
/// <summary>Indicates a 2-channel unsigned integer format with 32 bits per channel.</summary>
RG32Uint = 103,
/// <summary>Indicates a 2-channel signed integer format with 32 bits per channel.</summary>
Expand All @@ -491,6 +518,15 @@ public enum MTLPixelFormat : ulong {
RGBA16Sint = 114,
/// <summary>Indicates a format with 4 16-bit floating point channels.</summary>
RGBA16Float = 115,
/// <summary>A three-channel, 32-bit-per-channel unsigned integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB32Uint = 120,
/// <summary>A three-channel, 32-bit-per-channel signed integer RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB32Sint = 121,
/// <summary>A three-channel, 32-bit-per-channel floating-point RGB format for texture buffers without shader-write usage.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
RGB32Float = 122,
/// <summary>Indicates a format with 4 32-bit unsigned integer channels.</summary>
RGBA32Uint = 123,
/// <summary>Indicates a format with 4 32-bit signed integer channels.</summary>
Expand Down Expand Up @@ -1996,6 +2032,8 @@ public enum MTLGpuFamily : long {
Apple9 = 1009,
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
Apple10 = 1010,
/// <summary>The Apple11 GPU family.</summary>
Apple11 = 1011,
Mac1 = 2001,
Mac2 = 2002,
Common1 = 3001,
Expand Down Expand Up @@ -2638,4 +2676,26 @@ public enum MTLSamplerReductionMode : ulong {
Minimum = 1,
Maximum = 2,
}

/// <summary>Specifies how a compute pipeline relieves contention.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Native]
public enum MTLContentionRelief : long {
/// <summary>Lets Metal select the contention-relief behavior.</summary>
Automatic = 0,
/// <summary>Disables contention relief.</summary>
None = 1,
}

/// <summary>Specifies the forward-progress behavior of a compute pipeline.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Native]
public enum MTLForwardProgressUsage : long {
/// <summary>Lets Metal select the forward-progress behavior.</summary>
Automatic = 0,
/// <summary>Uses weak forward progress.</summary>
Weak = 1,
/// <summary>Uses SIMD-group parallel forward progress.</summary>
SimdGroupParallel = 2,
}
}
60 changes: 60 additions & 0 deletions src/metal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,20 @@ partial interface MTLComputePipelineState : MTLAllocation {
[Abstract]
[Export ("requiredThreadsPerThreadgroup")]
MTLSize RequiredThreadsPerThreadgroup { get; }

/// <summary>Gets the recommended number of persistent threadgroups per grid for a threadgroup size.</summary>
/// <param name="threadsPerThreadgroup">The number of threads in each dimension of a threadgroup.</param>
/// <returns>The recommended number of persistent threadgroups per grid.</returns>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Abstract]
[Export ("recommendedPersistentThreadgroupsPerGridForThreadsPerThreadgroup:")]
nuint GetRecommendedPersistentThreadgroupsPerGrid (MTLSize threadsPerThreadgroup);

/// <summary>Gets the forward-progress behavior of the compute pipeline.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Abstract]
[Export ("forwardProgressUsage")]
MTLForwardProgressUsage ForwardProgressUsage { get; }
}

interface IMTLBlitCommandEncoder { }
Expand Down Expand Up @@ -2394,6 +2408,15 @@ partial interface MTLTexture : MTLResource {
[Abstract]
[Export ("sparseTextureTier")]
MTLTextureSparseTier SparseTextureTier { get; }

/// <summary>Gets the lower limit of the level-of-detail range that texture operations can access.</summary>
/// <remarks>The GPU applies this limit after sampler LOD clamping and texture-view level-range offsets.</remarks>
[UnsupportedSimulator ("ios")]
[UnsupportedSimulator ("tvos")]
[Mac (27, 0), iOS (27, 0), TV (27, 0), MacCatalyst (27, 0)]
[Abstract]
[Export ("minLOD")]
float MinLod { get; }
}


Expand Down Expand Up @@ -4998,6 +5021,21 @@ interface MTLComputePipelineDescriptor : NSCopying {
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
[Export ("requiredThreadsPerThreadgroup", ArgumentSemantic.Assign)]
MTLSize RequiredThreadsPerThreadgroup { get; set; }

/// <summary>Gets or sets the forward-progress behavior to use for the compute pipeline.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Export ("forwardProgressUsage", ArgumentSemantic.Assign)]
MTLForwardProgressUsage ForwardProgressUsage { get; set; }

/// <summary>Gets or sets how the compute pipeline relieves contention.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Export ("contentionRelief", ArgumentSemantic.Assign)]
MTLContentionRelief ContentionRelief { get; set; }

/// <summary>Gets or sets whether to optimize the compute pipeline for a persistent kernel.</summary>
[Mac (27, 0), iOS (27, 0), MacCatalyst (27, 0), TV (27, 0)]
[Export ("optimizeForPersistentKernel")]
bool OptimizeForPersistentKernel { get; set; }
}

[MacCatalyst (13, 1)]
Expand Down Expand Up @@ -9251,6 +9289,21 @@ interface MTL4ComputePipelineDescriptor {
[Export ("supportIndirectCommandBuffers", ArgumentSemantic.Assign)]
MTL4IndirectCommandBufferSupportState SupportIndirectCommandBuffers { get; set; }

/// <summary>Gets or sets the forward-progress behavior to use for the compute pipeline.</summary>
[Mac (27, 0), iOS (27, 0), TV (27, 0), MacCatalyst (27, 0)]
[Export ("forwardProgressUsage", ArgumentSemantic.Assign)]
MTLForwardProgressUsage ForwardProgressUsage { get; set; }

/// <summary>Gets or sets how the compute pipeline relieves contention.</summary>
[Mac (27, 0), iOS (27, 0), TV (27, 0), MacCatalyst (27, 0)]
[Export ("contentionRelief", ArgumentSemantic.Assign)]
MTLContentionRelief ContentionRelief { get; set; }

/// <summary>Gets or sets whether to optimize the compute pipeline for a persistent kernel.</summary>
[Mac (27, 0), iOS (27, 0), TV (27, 0), MacCatalyst (27, 0)]
[Export ("optimizeForPersistentKernel")]
bool OptimizeForPersistentKernel { get; set; }

[Export ("reset")]
void Reset ();
}
Expand Down Expand Up @@ -10042,5 +10095,12 @@ interface MTLTextureViewDescriptor : NSCopying {

[Export ("swizzle", ArgumentSemantic.Assign)]
MTLTextureSwizzleChannels Swizzle { get; set; }

/// <summary>Gets or sets the lower limit of the level-of-detail range for texture views created with this descriptor.</summary>
/// <value>The default value is <c>0.0</c>.</value>
/// <remarks>The GPU applies this limit after sampler LOD clamping and texture-view level-range offsets.</remarks>
[Mac (27, 0), iOS (27, 0), TV (27, 0), MacCatalyst (27, 0)]
[Export ("minLOD")]
float MinLod { get; set; }
}
}
1 change: 1 addition & 0 deletions tests/introspection/ApiTypoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ public ApiTypoTest ()
{ "Shadable", All }, // graphics term
{ "Siemen", All & ~ApplePlatform.TVOS }, // Apple API singular form
{ "Signbit", All }, // math library term
{ "Simd", All }, // Single Instruction, Multiple Data
{ "Sint", All }, // as in "Signed Integer"
{ "Sixtyfour", ApplePlatform.MacOSX }, // compound number word
{ "Slerp", All }, // spherical interpolation
Expand Down

This file was deleted.

32 changes: 0 additions & 32 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-Metal.todo

This file was deleted.

32 changes: 0 additions & 32 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-Metal.todo

This file was deleted.

Loading
Loading