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

Add Pipeline as a ResourceType and implement it for VkPipeline's #2069

Merged
merged 4 commits into from
Aug 10, 2018

Conversation

sean-purcell
Copy link
Contributor

Pipeline's ResourceData returns their shaders and their bound data. The Vulkan implementation relies on https://github.com/chaoticbob/SPIRV-Reflect, although until KhronosGroup/SPIRV-Reflect#56 and KhronosGroup/SPIRV-Reflect#58 are merged, https://github.com/iburinoc/SPIRV-Reflect is being used as upstream.

Additionally, a gapit verb has been added to access the functionality. It prints out data on the most-recently bound pipeline for either graphics or compute, given a point in a trace.

$ gapit dump_pipeline -at "[891, 0, 0, 12]" bloom.gfxtrace
3 bindings:
Binding #0.0:
    Type:           VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
    Used by stages: Vertex
    Bound value: Buffer
        Handle: 94897824474800
        Offset: 0
        Range:  18446744073709551615
Binding #0.1:
    Type: VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
    Unused by pipeline
    Bound value: Unbound
Binding #0.2:
    Type: VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
    Unused by pipeline
    Bound value: Unbound
$ gapit dump_pipeline -at 195 -compute compute.gfxtrace
3 bindings:
Binding #0.0:
    Type:           VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
    Used by stages: Compute
    Bound value: Buffer
        Handle: 94286579036880
        Offset: 0
        Range:  18446744073709551615
Binding #0.1:
    Type:           VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
    Used by stages: Compute
    Bound value: Buffer
        Handle: 94286579389344
        Offset: 0
        Range:  18446744073709551615
Binding #0.2:
    Type:           VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
    Used by stages: Compute
    Bound value: Buffer
        Handle: 94286579390368
        Offset: 0
        Range:  18446744073709551615

@@ -265,4 +265,12 @@ type (
Gapis GapisFlags
At flags.U64Slice `help:"command/subcommand index to get the memory after. Empty for last"`
}
PipelineFlags struct {
Gapis GapisFlags
At flags.U64Slice `help:"command/subcommand index to get the memory after. Empty for last"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/memory/pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sean-purcell
Copy link
Contributor Author

@AWoloszyn KhronosGroup/SPIRV-Reflect#56 has been merged so this is ready to go

SPIRV-Reflect offers tools to analyze the interface exposed by a spirv
module.  It's used here to parse the descriptor sets that a given entry
point of a module uses.
Copy link
Contributor

@AWoloszyn AWoloszyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, If you can rebase and squash some of the commits, once the bots are green I will merge it.

@AWoloszyn AWoloszyn merged commit 0a85956 into google:master Aug 10, 2018
AWoloszyn added a commit to AWoloszyn/gapid that referenced this pull request Aug 10, 2018
@sean-purcell sean-purcell deleted the descriptor-sets branch August 13, 2018 02:48
AWoloszyn added a commit that referenced this pull request Aug 14, 2018
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.

3 participants