llvm / llvm/llvm-project

[HLSL] Implement indexed packing of semantic signatures

Closed
#205,877 2 comments 0 reactions 1 assignee Claimed by @inbelic View on GitHub
HLSL
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This issue tracks the implementation of the indexed signature packing algorithm. This should be made available by a function that will take a mutable arrayref of signature elements and update the start row and start col so the elements are packed into a grid.

This is used in the packing of `Target` semantic signatures of pixel shaders.

The indexed packing algorithm places each semantic at the row of it's semantic index and there is no co-packing of elements.

For more comprehensive references:
- [Semantics Overview](https://github.com/llvm/wg-hlsl/blob/main/proposals/0040-semantics-overview.md#signature-packing-constraints)
- [DXIL Spec](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#signature-packing)

AC:
- [ ] A function for the packing algorithm is defined in `llvm/Frontend/HLSL/SemanticSignatures.h`
- [ ] Unit testing of the packing is defined in `llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.