[HLSL] Add SV_DispatchThreadID
authorXiang Li <python3kgae@outlook.com>
Tue, 18 Oct 2022 20:09:01 +0000 (13:09 -0700)
committerXiang Li <python3kgae@outlook.com>
Tue, 18 Oct 2022 23:17:19 +0000 (16:17 -0700)
commit14ae5d2b745f76018a963b395fc9d7ad987f1c5c
treeea965d66001edc039e4c026c5f2a33dbac479dde
parente0401d2252891e2adf8d81be52ae106f08b799b5
[HLSL] Add SV_DispatchThreadID

Support SV_DispatchThreadID attribute.
Translate it into dx.thread.id in clang codeGen.

Reviewed By: beanz, aaron.ballman

Differential Revision: https://reviews.llvm.org/D133983
12 files changed:
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/CGHLSLRuntime.cpp
clang/lib/CodeGen/CGHLSLRuntime.h
clang/lib/Parse/ParseHLSL.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl [new file with mode: 0644]
clang/test/CodeGenHLSL/sret_output.hlsl [new file with mode: 0644]
clang/test/SemaHLSL/Semantics/entry_parameter.hlsl
clang/test/SemaHLSL/Semantics/invalid_entry_parameter.hlsl [new file with mode: 0644]
clang/test/SemaHLSL/Semantics/valid_entry_parameter.hlsl [new file with mode: 0644]