Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflection fixes #224

Merged
merged 1 commit into from
Dec 19, 2021
Merged

Reflection fixes #224

merged 1 commit into from
Dec 19, 2021

Conversation

mxpv
Copy link
Contributor

@mxpv mxpv commented Dec 19, 2021

  • There is no need to allocate MTLRenderPipelineReflection when calling newRenderPipelineStateWithDescriptor with reflection.
  • Adds array wrappers to iterate over reflection information.
  • Removes new_render_pipeline_state_with_fail_on_binary_archive_miss (refactored new_render_pipeline_state_with_reflection covers it).
  • Exposes MTLPipelineOption
  • Access reflection for compute pipeline.
  • Update relevant documentation.

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

@kvark kvark merged commit 2fb6930 into gfx-rs:master Dec 19, 2021
@mxpv mxpv deleted the reflection branch January 13, 2022 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants