-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[DirectX] Lower @llvm.dx.typedBufferLoad
to DXIL ops
#104252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6ae3fc1
74537cd
3e7a95c
63e2f09
2f31701
94a48e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,10 @@ def Int64Ty : DXILOpParamType; | |
def HalfTy : DXILOpParamType; | ||
def FloatTy : DXILOpParamType; | ||
def DoubleTy : DXILOpParamType; | ||
def ResRetTy : DXILOpParamType; | ||
def ResRetHalfTy : DXILOpParamType; | ||
def ResRetFloatTy : DXILOpParamType; | ||
def ResRetInt16Ty : DXILOpParamType; | ||
def ResRetInt32Ty : DXILOpParamType; | ||
def HandleTy : DXILOpParamType; | ||
def ResBindTy : DXILOpParamType; | ||
def ResPropsTy : DXILOpParamType; | ||
|
@@ -693,6 +696,17 @@ def CreateHandle : DXILOp<57, createHandle> { | |
let stages = [Stages<DXIL1_0, [all_stages]>, Stages<DXIL1_6, [removed]>]; | ||
} | ||
|
||
def BufferLoad : DXILOp<68, bufferLoad> { | ||
let Doc = "reads from a TypedBuffer"; | ||
// Handle, Coord0, Coord1 | ||
let arguments = [HandleTy, Int32Ty, Int32Ty]; | ||
let result = OverloadTy; | ||
let overloads = | ||
[Overloads<DXIL1_0, | ||
[ResRetHalfTy, ResRetFloatTy, ResRetInt16Ty, ResRetInt32Ty]>]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the 16-bit overloads valid in dxil 1.0? I suppose maybe they are used to represent ther the minprec types, but true 16-bit types only came in with dxil 1.2 I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding from a discussion about this quite a while ago was that 16 bit types are valid DXIL retroactively to DXIL 1.0 but it isn't actually possible to enable 16 bit types until circa SM6.2 / DXIL 1.2. I'm not 100% about that though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 16-bit overloads were always valid in DXIL 1.0, but they didn't actually mean 16-bit types, they meant the min16{float|int|uint} types. This is one of the things that's really wonky about DXIL defining interpretations of LLVM IR that conflicted with LLVM's core definition. I think the code here is accurate to what we need for that. |
||
let stages = [Stages<DXIL1_0, [all_stages]>]; | ||
} | ||
|
||
def ThreadId : DXILOp<93, threadId> { | ||
let Doc = "Reads the thread ID"; | ||
let LLVMIntrinsic = int_dx_thread_id; | ||
|
Uh oh!
There was an error while loading. Please reload this page.