gfx-rs / metal-rs

Rust bindings for Metal
Apache License 2.0
591 stars 112 forks source link

Reflection fixes #224

Closed mxpv closed 2 years ago

mxpv commented 2 years ago

Output from reflection example:

Vertex arguments: 
<MTLBufferArgument: 0x6000010980c0>
    Name = vertex_array 
    Type = MTLArgumentTypeBuffer 
    Access = MTLArgumentAccessReadWrite 
    LocationIndex = 0 
    IsActive = 1 
    ArrayLength = 1 
    TypeInfo = 
        DataType = MTLDataTypePointer 
        ElementType = MTLDataTypeStruct 
        ElementTypeDescription = <MTLStructTypeInternal: 0x600003a8df50>
            DataType = MTLDataTypeStruct 
            0 <MTLStructMemberInternal: 0x600001098120>
                Name = position 
                Offset = 0 
                DataType = MTLDataTypeFloat2 
                ArgumentIndex = 0 
                TypeInfo =  nil 
            1 <MTLStructMemberInternal: 0x600001098180>
                Name = color 
                Offset = 16 
                DataType = MTLDataTypeFloat3 
                ArgumentIndex = 0 
                TypeInfo =  nil 
        Access = MTLArgumentAccessReadWrite 
        Alignment = 16 
        DataSize = 32
    Alignment = 16 
    DataSize = 32 
    DataType = MTLDataTypeStruct

Process finished with exit code 0