Commit Graph

3 Commits

Author SHA1 Message Date
Xiang Li a9c875b19a [NFC] [DirectX] Cleanup test for comput_ids.
Cleanup test for review in https://reviews.llvm.org/D127990
2022-07-07 14:02:32 -07:00
Chris Bieneman e0b5208650 [NFC] [DirectX] Prefix for intrinsics should be dx
`dxil` is an architecture supported by the DirectX backend. These
intrinsics will likely be shared with other DirectX architectures like
`dxbc`. Using a common prefix `dx` will make it more intuitive.

Also the `dx` prefix is already set in the Triple, which causes
intrinsics described here to be unmatchable via the ClangBuiltin
mechanism.
2022-07-06 13:27:12 -05:00
Xiang Li 43dc319049 [DirectX] add thread/group id DXIL operations.
Add DXIL operation for thread/group id operations.

ID  Name	                     Description
93  ThreadId	                 reads the thread ID
94  GroupId	                  reads the group ID (SV_GroupID)
95  ThreadIdInGroup	          reads the thread ID within the group (SV_GroupThreadID)
96  FlattenedThreadIdInGroup	 provides a flattened index for a given thread within a given group (SV_GroupIndex)

Also add llvm intrinsic which map to these intrinsics to DXIL operation.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D127990
2022-07-01 10:56:07 -07:00