mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 14:18:47 +00:00
Begin work on Metal
This commit is contained in:
+270
@@ -0,0 +1,270 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
AccelerationStructureUsage :: distinct bit_set[AccelerationStructureUsageFlag; NS.UInteger]
|
||||||
|
AccelerationStructureUsageFlag :: enum NS.UInteger {
|
||||||
|
Refit = 0,
|
||||||
|
PreferFastBuild = 1,
|
||||||
|
ExtendedLimits = 2,
|
||||||
|
}
|
||||||
|
AccelerationStructureUsageNone :: AccelerationStructureUsage{}
|
||||||
|
|
||||||
|
AccelerationStructureInstanceOptions :: distinct bit_set[AccelerationStructureInstanceOption; u32]
|
||||||
|
AccelerationStructureInstanceOption :: enum u32 {
|
||||||
|
DisableTriangleCulling = 0,
|
||||||
|
TriangleFrontFacingWindingCounterClockwise = 1,
|
||||||
|
Opaque = 2,
|
||||||
|
NonOpaque = 3,
|
||||||
|
}
|
||||||
|
AccelerationStructureInstanceOptionNone :: AccelerationStructureInstanceOptions{}
|
||||||
|
|
||||||
|
MotionBorderMode :: enum u32 {
|
||||||
|
Clamp = 0,
|
||||||
|
Vanish = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureInstanceDescriptor :: struct #packed {
|
||||||
|
transformationMatrix: PackedFloat4x3,
|
||||||
|
options: AccelerationStructureInstanceOptions,
|
||||||
|
mask: u32,
|
||||||
|
intersectionFunctionTableOffset: u32,
|
||||||
|
accelerationStructureIndex: u32,
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureUserIDInstanceDescriptor :: struct #packed {
|
||||||
|
transformationMatrix: PackedFloat4x3,
|
||||||
|
options: AccelerationStructureInstanceOptions,
|
||||||
|
mask: u32,
|
||||||
|
intersectionFunctionTableOffset: u32,
|
||||||
|
accelerationStructureIndex: u32,
|
||||||
|
userID: u32,
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureInstanceDescriptorType :: enum NS.UInteger {
|
||||||
|
Default = 0,
|
||||||
|
UserID = 1,
|
||||||
|
Motion = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureMotionInstanceDescriptor :: struct #packed {
|
||||||
|
options: AccelerationStructureInstanceOptions,
|
||||||
|
mask: u32,
|
||||||
|
intersectionFunctionTableOffset: u32,
|
||||||
|
accelerationStructureIndex: u32,
|
||||||
|
userID: u32,
|
||||||
|
motionTransformsStartIndex: u32,
|
||||||
|
motionTransformsCount: u32,
|
||||||
|
motionStartBorderMode: MotionBorderMode,
|
||||||
|
motionEndBorderMode: MotionBorderMode,
|
||||||
|
motionStartTime: f32,
|
||||||
|
motionEndTime: f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureDescriptor")
|
||||||
|
AccelerationStructureDescriptor :: struct { using _: NS.Copying(AccelerationStructureDescriptor) }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureGeometryDescriptor")
|
||||||
|
AccelerationStructureGeometryDescriptor :: struct { using _: NS.Copying(AccelerationStructureGeometryDescriptor) }
|
||||||
|
|
||||||
|
@(objc_class="NSPrimitiveAccelerationStructureDescriptor")
|
||||||
|
PrimitiveAccelerationStructureDescriptor :: struct { using _: NS.Copying(PrimitiveAccelerationStructureDescriptor), using _: AccelerationStructureDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureTriangleGeometryDescriptor")
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor :: struct { using _: NS.Copying(AccelerationStructureTriangleGeometryDescriptor), using _: AccelerationStructureGeometryDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureBoundingBoxGeometryDescriptor")
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor :: struct { using _: NS.Copying(AccelerationStructureBoundingBoxGeometryDescriptor), using _: AccelerationStructureGeometryDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSMotionKeyframeData")
|
||||||
|
MotionKeyframeData :: struct { using _: NS.Object }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureMotionTriangleGeometryDescriptor")
|
||||||
|
AccelerationStructureMotionTriangleGeometryDescriptor :: struct { using _: NS.Copying(AccelerationStructureMotionTriangleGeometryDescriptor), using _: AccelerationStructureGeometryDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructureMotionBoundingBoxGeometryDescriptor")
|
||||||
|
AccelerationStructureMotionBoundingBoxGeometryDescriptor :: struct { using _: NS.Copying(AccelerationStructureMotionBoundingBoxGeometryDescriptor), using _: AccelerationStructureGeometryDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSInstanceAccelerationStructureDescriptor")
|
||||||
|
InstanceAccelerationStructureDescriptor :: struct { using _: NS.Copying(InstanceAccelerationStructureDescriptor), using _: AccelerationStructureGeometryDescriptor }
|
||||||
|
|
||||||
|
@(objc_class="NSAccelerationStructure")
|
||||||
|
AccelerationStructure :: struct { using _: NS.Object }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureDescriptor_usage :: proc(self: ^AccelerationStructureDescriptor) -> AccelerationStructureUsage {
|
||||||
|
return msgSend(AccelerationStructureUsage, self, "usage")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_intersectionFunctionTableOffset :: proc(self: ^AccelerationStructureGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "intersectionFunctionTableOffset")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_setIntersectionFunctionTableOffset :: proc(self: ^AccelerationStructureGeometryDescriptor, intersectionFunctionTableOffset: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setIntersectionFunctionTableOffset:", intersectionFunctionTableOffset)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_opaque :: proc(self: ^AccelerationStructureGeometryDescriptor) -> BOOL {
|
||||||
|
return msgSend(BOOL, self, "opaque")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_setOpaque :: proc(self: ^AccelerationStructureGeometryDescriptor, opaque: BOOL) {
|
||||||
|
msgSend(nil, self, "setOpaque:", opaque)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_allowDuplicateIntersectionFunctionInvocation :: proc(self: ^AccelerationStructureGeometryDescriptor) -> BOOL {
|
||||||
|
return msgSend(BOOL, self, "allowDuplicateIntersectionFunctionInvocation")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_setAllowDuplicateIntersectionFunctionInvocation :: proc(self: ^AccelerationStructureGeometryDescriptor, allowDuplicateIntersectionFunctionInvocation: BOOL) {
|
||||||
|
msgSend(nil, self, "setAllowDuplicateIntersectionFunctionInvocation:", allowDuplicateIntersectionFunctionInvocation)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_label :: proc(self: ^AccelerationStructureGeometryDescriptor) -> ^NS.String {
|
||||||
|
return msgSend(^NS.String, self, "label")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureGeometryDescriptor_setLabel :: proc(self: ^AccelerationStructureGeometryDescriptor, label: ^NS.String) {
|
||||||
|
msgSend(nil, self, "setLabel:", label)
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_geometryDescriptors :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> (descriptors: ^NS.Array(^NS.Object)) {
|
||||||
|
return msgSend(type_of(descriptors), self, "geometryDescriptors")
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setGeometryDescriptors :: proc(self: ^PrimitiveAccelerationStructureDescriptor, descriptors: ^NS.Array(^NS.Object)) {
|
||||||
|
msgSend(nil, self, "setGeometryDescriptors:", descriptors)
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_motionStartBorderMode :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> MotionBorderMode {
|
||||||
|
return msgSend(MotionBorderMode, self, "motionStartBorderMode")
|
||||||
|
}
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setMotionStartBorderMode :: proc(self: ^PrimitiveAccelerationStructureDescriptor, motionStartBorderMode: MotionBorderMode) {
|
||||||
|
msgSend(nil, self, "setMotionStartBorderMode:", motionStartBorderMode)
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_motionEndBorderMode :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> MotionBorderMode {
|
||||||
|
return msgSend(MotionBorderMode, self, "motionEndBorderMode")
|
||||||
|
}
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setMotionEndBorderMode :: proc(self: ^PrimitiveAccelerationStructureDescriptor, motionEndBorderMode: MotionBorderMode) {
|
||||||
|
msgSend(nil, self, "setMotionEndBorderMode:", motionEndBorderMode)
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_motionStartTime :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> (motionStartTime: f32) {
|
||||||
|
return msgSend(f32, self, "motionStartTime")
|
||||||
|
}
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setMotionStartTime :: proc(self: ^PrimitiveAccelerationStructureDescriptor, motionStartTime: f32) {
|
||||||
|
msgSend(nil, self, "setMotionStartTime:", motionStartTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_motionEndTime :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> (motionEndTime: f32) {
|
||||||
|
return msgSend(f32, self, "motionEndTime")
|
||||||
|
}
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setMotionEndTime :: proc(self: ^PrimitiveAccelerationStructureDescriptor, motionEndTime: f32) {
|
||||||
|
msgSend(nil, self, "setMotionEndTime:", motionEndTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_motionKeyframeCount :: proc(self: ^PrimitiveAccelerationStructureDescriptor) -> (motionKeyframeCount: NS.UInteger) {
|
||||||
|
return msgSend(NS.UInteger, self, "motionKeyframeCount")
|
||||||
|
}
|
||||||
|
PrimitiveAccelerationStructureDescriptor_setmotionKeyframeCount :: proc(self: ^PrimitiveAccelerationStructureDescriptor, motionKeyframeCount: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setMotionKeyframeCount:", motionKeyframeCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimitiveAccelerationStructureDescriptor_descriptor :: proc() -> ^PrimitiveAccelerationStructureDescriptor {
|
||||||
|
return msgSend(^PrimitiveAccelerationStructureDescriptor, PrimitiveAccelerationStructureDescriptor, "descriptor")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_vertexBuffer :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> ^Buffer {
|
||||||
|
return msgSend(^Buffer, self, "vertexBuffer")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setVertexBuffer :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, buffer: ^Buffer) {
|
||||||
|
msgSend(nil, self, "setVertexBuffer:", buffer)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_vertexBufferOffset :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "vertexBufferOffset")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setVertexBufferOffset :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, vertexBufferOffset: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setVertexBufferOffset:", vertexBufferOffset)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_vertexStride :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "vertexStride")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setVertexStride :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, vertexStride: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setVertexStride:", vertexStride)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_indexBuffer :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> ^Buffer {
|
||||||
|
return msgSend(^Buffer, self, "indexBuffer")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setIndexBuffer :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, buffer: ^Buffer) {
|
||||||
|
msgSend(nil, self, "setIndexBuffer:", buffer)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_indexBufferOffset :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "indexBufferOffset")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setIndexBufferOffset :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, indexBufferOffset: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setIndexBufferOffset:", indexBufferOffset)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_indexType :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> IndexType {
|
||||||
|
return msgSend(IndexType, self, "indexType")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setIndexType :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, indextype: IndexType) {
|
||||||
|
msgSend(nil, self, "setIndexType:", indextype)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_triangleCount :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "triangleCount")
|
||||||
|
}
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_setTriangleCount :: proc(self: ^AccelerationStructureTriangleGeometryDescriptor, triangleCount: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setTriangleCount", triangleCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureTriangleGeometryDescriptor_descriptor :: proc() -> ^AccelerationStructureTriangleGeometryDescriptor {
|
||||||
|
return msgSend(^AccelerationStructureTriangleGeometryDescriptor, AccelerationStructureTriangleGeometryDescriptor, "descriptor")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_boundingBoxBuffer :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor) -> ^Buffer {
|
||||||
|
return msgSend(^Buffer, self, "boundingBoxBuffer")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_setBoundingBoxBuffer :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor, buffer: ^Buffer) {
|
||||||
|
msgSend(nil, self, "setBoundingBoxBuffer:", buffer)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_boundingBoxBufferOffset :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "boundingBoxBufferOffset")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_setBoundingBoxBufferOffset :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor, boundingBoxBufferOffset: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setBoundingBoxBufferOffset:", boundingBoxBufferOffset)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_boundingBoxStride :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "boundingBoxStride")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_setBoundingBoxStride :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor, boundingBoxStride: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setBoundingBoxStride:", boundingBoxStride)
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_boundingBoxCount :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor) -> NS.UInteger {
|
||||||
|
return msgSend(NS.UInteger, self, "boundingBoxCount")
|
||||||
|
}
|
||||||
|
|
||||||
|
AccelerationStructureBoundingBoxGeometryDescriptor_setBoundingBoxCount :: proc(self: ^AccelerationStructureBoundingBoxGeometryDescriptor, boundingBoxCount: NS.UInteger) {
|
||||||
|
msgSend(nil, self, "setBoundingBoxCount:", boundingBoxCount)
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
PackedFloat3 :: distinct [3]f32
|
||||||
|
PackedFloat4x3 :: distinct [4]PackedFloat3
|
||||||
|
|
||||||
|
AxisAlignedBoundingBox :: struct{
|
||||||
|
min, ax: PackedFloat3,
|
||||||
|
}
|
||||||
Vendored
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
BlendFactor :: enum NS.UInteger {
|
||||||
|
Zero = 0,
|
||||||
|
One = 1,
|
||||||
|
SourceColor = 2,
|
||||||
|
OneMinusSourceColor = 3,
|
||||||
|
SourceAlpha = 4,
|
||||||
|
OneMinusSourceAlpha = 5,
|
||||||
|
DestinationColor = 6,
|
||||||
|
OneMinusDestinationColor = 7,
|
||||||
|
DestinationAlpha = 8,
|
||||||
|
OneMinusDestinationAlpha = 9,
|
||||||
|
SourceAlphaSaturated = 10,
|
||||||
|
BlendColor = 11,
|
||||||
|
OneMinusBlendColor = 12,
|
||||||
|
BlendAlpha = 13,
|
||||||
|
OneMinusBlendAlpha = 14,
|
||||||
|
Source1Color = 15,
|
||||||
|
OneMinusSource1Color = 16,
|
||||||
|
Source1Alpha = 17,
|
||||||
|
OneMinusSource1Alpha = 18,
|
||||||
|
}
|
||||||
|
|
||||||
|
BlendOperation :: enum NS.UInteger {
|
||||||
|
Add = 0,
|
||||||
|
Subtract = 1,
|
||||||
|
ReverseSubtract = 2,
|
||||||
|
Min = 3,
|
||||||
|
Max = 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorWriteMaskOption :: enum NS.UInteger {
|
||||||
|
Alpha = 0,
|
||||||
|
Blue = 1,
|
||||||
|
Green = 2,
|
||||||
|
Red = 3,
|
||||||
|
}
|
||||||
|
ColorWriteMask :: distinct bit_set[ColorWriteMaskOption; NS.UInteger]
|
||||||
|
ColorWriteMaskNone :: ColorWriteMask{}
|
||||||
|
ColorWriteMaskAll :: ColorWriteMask{.Alpha, .Blue, .Green, .Red}
|
||||||
|
|
||||||
|
PrimitiveTopologyClass :: enum NS.UInteger {
|
||||||
|
ClassUnspecified = 0,
|
||||||
|
ClassPoint = 1,
|
||||||
|
ClassLine = 2,
|
||||||
|
ClassTriangle = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
TessellationPartitionMode :: enum NS.UInteger {
|
||||||
|
ModePow2 = 0,
|
||||||
|
ModeInteger = 1,
|
||||||
|
ModeFractionalOdd = 2,
|
||||||
|
ModeFractionalEven = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
TessellationFactorStepFunction :: enum NS.UInteger {
|
||||||
|
Constant = 0,
|
||||||
|
PerPatch = 1,
|
||||||
|
PerInstance = 2,
|
||||||
|
PerPatchAndPerInstance = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
TessellationFactorFormat :: enum NS.UInteger {
|
||||||
|
Half = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
TessellationControlPointIndexType :: enum NS.UInteger {
|
||||||
|
None = 0,
|
||||||
|
UInt16 = 1,
|
||||||
|
UInt32 = 2,
|
||||||
|
}
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
|
||||||
|
AttributeFormat :: enum NS.UInteger {
|
||||||
|
Invalid = 0,
|
||||||
|
UChar2 = 1,
|
||||||
|
UChar3 = 2,
|
||||||
|
UChar4 = 3,
|
||||||
|
Char2 = 4,
|
||||||
|
Char3 = 5,
|
||||||
|
Char4 = 6,
|
||||||
|
UChar2Normalized = 7,
|
||||||
|
UChar3Normalized = 8,
|
||||||
|
UChar4Normalized = 9,
|
||||||
|
Char2Normalized = 10,
|
||||||
|
Char3Normalized = 11,
|
||||||
|
Char4Normalized = 12,
|
||||||
|
UShort2 = 13,
|
||||||
|
UShort3 = 14,
|
||||||
|
UShort4 = 15,
|
||||||
|
Short2 = 16,
|
||||||
|
Short3 = 17,
|
||||||
|
Short4 = 18,
|
||||||
|
UShort2Normalized = 19,
|
||||||
|
UShort3Normalized = 20,
|
||||||
|
UShort4Normalized = 21,
|
||||||
|
Short2Normalized = 22,
|
||||||
|
Short3Normalized = 23,
|
||||||
|
Short4Normalized = 24,
|
||||||
|
Half2 = 25,
|
||||||
|
Half3 = 26,
|
||||||
|
Half4 = 27,
|
||||||
|
Float = 28,
|
||||||
|
Float2 = 29,
|
||||||
|
Float3 = 30,
|
||||||
|
Float4 = 31,
|
||||||
|
Int = 32,
|
||||||
|
Int2 = 33,
|
||||||
|
Int3 = 34,
|
||||||
|
Int4 = 35,
|
||||||
|
UInt = 36,
|
||||||
|
UInt2 = 37,
|
||||||
|
UInt3 = 38,
|
||||||
|
UInt4 = 39,
|
||||||
|
Int1010102Normalized = 40,
|
||||||
|
UInt1010102Normalized = 41,
|
||||||
|
UChar4Normalized_BGRA = 42,
|
||||||
|
UChar = 45,
|
||||||
|
Char = 46,
|
||||||
|
UCharNormalized = 47,
|
||||||
|
CharNormalized = 48,
|
||||||
|
UShort = 49,
|
||||||
|
Short = 50,
|
||||||
|
UShortNormalized = 51,
|
||||||
|
ShortNormalized = 52,
|
||||||
|
Half = 53,
|
||||||
|
}
|
||||||
|
|
||||||
|
IndexType :: enum NS.UInteger {
|
||||||
|
UInt16 = 0,
|
||||||
|
UInt32 = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
StepFunction :: enum NS.UInteger {
|
||||||
|
Constant = 0,
|
||||||
|
PerVertex = 1,
|
||||||
|
PerInstance = 2,
|
||||||
|
PerPatch = 3,
|
||||||
|
PerPatchControlPoint = 4,
|
||||||
|
ThreadPositionInGridX = 5,
|
||||||
|
ThreadPositionInGridY = 6,
|
||||||
|
ThreadPositionInGridXIndexed = 7,
|
||||||
|
ThreadPositionInGridYIndexed = 8,
|
||||||
|
}
|
||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
import "core:intrinsics"
|
||||||
|
|
||||||
|
alloc :: NS.alloc
|
||||||
|
init :: NS.init
|
||||||
|
retain :: NS.retain
|
||||||
|
release :: NS.release
|
||||||
|
autorelease :: NS.autorelease
|
||||||
|
retainCount :: NS.retainCount
|
||||||
|
copy :: NS.copy
|
||||||
|
hash :: NS.hash
|
||||||
|
isEqual :: NS.isEqual
|
||||||
|
description :: NS.description
|
||||||
|
debugDescription :: NS.debugDescription
|
||||||
|
bridgingCast :: NS.bridgingCast
|
||||||
|
|
||||||
|
@(private)
|
||||||
|
msgSend :: intrinsics.objc_send
|
||||||
|
|
||||||
|
BOOL :: NS.BOOL
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
Buffer :: struct { using _: Resource }
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package objc_Metal
|
||||||
|
|
||||||
|
import NS "core:sys/darwin/Foundation"
|
||||||
|
|
||||||
|
Resource :: struct { using _: NS.Object }
|
||||||
Reference in New Issue
Block a user