New named metadata "dx.entryPoints" is added to save all entries.
Each entry is in format of
!{ptr to function, name, signature, resource table, extra}
For compute shader, the extra will save num of threads in format of {i32 x, i32 y, i32 z}
For library profile, an empty entry will be added to save the resource table for the library.
Signature and resource table metadata is not generated yet.
Differential Revision: https://reviews.llvm.org/D131807
13 lines
301 B
LLVM
13 lines
301 B
LLVM
; RUN: opt -S -dxil-metadata-emit %s | FileCheck %s
|
|
target triple = "dxil-pc-shadermodel6.6-geometry"
|
|
|
|
; CHECK: !dx.shaderModel = !{![[SM:[0-9]+]]}
|
|
; CHECK: ![[SM]] = !{!"gs", i32 6, i32 6}
|
|
|
|
define void @entry() #0 {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { noinline nounwind "hlsl.shader"="geometry" }
|