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

[DirectX] DXContainer PSV0 part Object support #59479

Closed
llvm-beanz opened this issue Dec 12, 2022 · 1 comment · Fixed by #66425
Closed

[DirectX] DXContainer PSV0 part Object support #59479

llvm-beanz opened this issue Dec 12, 2022 · 1 comment · Fixed by #66425
Assignees
Labels
backend:DirectX HLSL HLSL Language Support

Comments

@llvm-beanz
Copy link
Collaborator

llvm-beanz commented Dec 12, 2022

Summary

Add support for parsing and generating pipeline state validation data structures encoded in the PSV0 part. Parsing code should be added to libLLVMObject, with support in libLLVMObjectYAML for textual representation of the binary data. Support for emitting binary encoded PSV data should be split between the ObjectYAML emitter used for testing and the MC layer for generation of data structures from the compiler.

References

A description of the current object encoding is in the DXC code here:
https://github.com/microsoft/DirectXShaderCompiler/blob/main/include/dxc/DxilContainer/DxilPipelineStateValidation.h#L731

Deliverables

Updated obj2yaml and yaml2obj tools to which support extracting and encoding PSV0 data, and associated tests. Tests should verify correct round-trip parse->generate->parse for common variations and versioning of the data structures.

@llvm-beanz llvm-beanz self-assigned this Dec 12, 2022
@llvm-beanz llvm-beanz added HLSL HLSL Language Support backend:DirectX labels Dec 12, 2022
@llvm-beanz llvm-beanz changed the title [DirectX] DXContainer PSV0 part [DirectX] DXContainer PSV0 part Object support Feb 10, 2023
@llvm-beanz
Copy link
Collaborator Author

Posted another part of this for review as D155143.

llvm-beanz added a commit that referenced this issue Jul 19, 2023
When writing this initially I missed including the resource stride.
This change adds the resources stride to the serialized value.

I've also extended the testing and error reporting around parsing PSV
information. This adds tests to verify that the reader produces
meaningful error messages for malformed DXContainer files, and a test
that verifies the resource stride is respected in the reader even if
the stride isn't an expected or known value (as would happen if the
format changes in the future).

This is part of #59479.

Reviewed By: bogner, bob80905

Differential Revision: https://reviews.llvm.org/D155143
llvm-beanz added a commit that referenced this issue Sep 15, 2023
The DXContainer pipeline state information encodes a bunch of mask
vectors that are used to track things about the inputs and outputs from
each shader.

This adds support for reading and writing them throught he YAML test
interfaces. The writing logic in MC is extremely primitive and we'll
want to revisit the API for that, but since I'm not sure how we'll want
to generate the mask bits from DXIL during code generation I didn't want
to spend too much time on the API.

Fixes #59479
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
The DXContainer pipeline state information encodes a bunch of mask
vectors that are used to track things about the inputs and outputs from
each shader.

This adds support for reading and writing them throught he YAML test
interfaces. The writing logic in MC is extremely primitive and we'll
want to revisit the API for that, but since I'm not sure how we'll want
to generate the mask bits from DXIL during code generation I didn't want
to spend too much time on the API.

Fixes llvm#59479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:DirectX HLSL HLSL Language Support
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant