Commit 8e2bba9
[mlir][dxsa] Add sample instruction
Sample instruction takes an address, a resource (texture), a sampler,
and writes texture data to the destination register.
There are several optional that can be present:
- Offset is encoded as an extended opcode.
- LOD clamp and feeback for sample_cl_s.
The spec mentions clamp and feedback as optional, but DXC decodes them
both. It is possible that they are always present as operands, but can
be null.
Other extended instruction are added for other resource instructions,
and not enabled for sample instruction.
Feedback (ClampFeedback) and Offset are both supposed to be optional
attributes. MLIR parser is not able to handle cases where feedback is
present, but offset is absent, so and fails roundtrip verifier tests.
Therefore such instructions are separate, and feedback operand is not
optional.1 parent 224d480 commit 8e2bba9
10 files changed
Lines changed: 988 additions & 0 deletions
File tree
- mlir
- include/mlir/Dialect/DXSA/IR
- lib
- Dialect/DXSA/IR
- Target/DXSA
- test/Target/DXSA
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
0 commit comments