shader: Add IR opcode for ImageFetch
This commit is contained in:
parent
742d11c2ad
commit
b5db38f50e
7 changed files with 55 additions and 5 deletions
|
@ -1491,6 +1491,12 @@ Value IREmitter::ImageGatherDref(const Value& handle, const Value& coords, const
|
|||
return Inst(op, Flags{info}, handle, coords, offset, offset2, dref);
|
||||
}
|
||||
|
||||
Value IREmitter::ImageFetch(const Value& handle, const Value& coords, const Value& offset,
|
||||
const U32& lod, const U32& multisampling, TextureInstInfo info) {
|
||||
const Opcode op{handle.IsImmediate() ? Opcode::BoundImageFetch : Opcode::BindlessImageFetch};
|
||||
return Inst(op, Flags{info}, handle, coords, offset, lod, multisampling);
|
||||
}
|
||||
|
||||
U1 IREmitter::VoteAll(const U1& value) {
|
||||
return Inst<U1>(Opcode::VoteAll, value);
|
||||
}
|
||||
|
|
|
@ -243,8 +243,12 @@ public:
|
|||
[[nodiscard]] Value ImageGather(const Value& handle, const Value& coords, const Value& offset,
|
||||
const Value& offset2, TextureInstInfo info);
|
||||
|
||||
[[nodiscard]] Value ImageGatherDref(const Value& handle, const Value& coords, const Value& offset,
|
||||
const Value& offset2, const F32& dref, TextureInstInfo info);
|
||||
[[nodiscard]] Value ImageGatherDref(const Value& handle, const Value& coords,
|
||||
const Value& offset, const Value& offset2, const F32& dref,
|
||||
TextureInstInfo info);
|
||||
|
||||
[[nodiscard]] Value ImageFetch(const Value& handle, const Value& coords, const Value& offset,
|
||||
const U32& lod, const U32& multisampling, TextureInstInfo info);
|
||||
|
||||
[[nodiscard]] U1 VoteAll(const U1& value);
|
||||
[[nodiscard]] U1 VoteAny(const U1& value);
|
||||
|
|
|
@ -356,6 +356,7 @@ OPCODE(BindlessImageSampleDrefImplicitLod, F32, U32,
|
|||
OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
|
||||
OPCODE(BindlessImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
|
||||
OPCODE(BindlessImageFetch, F32x4, U32, Opaque, U32, U32, )
|
||||
|
||||
OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
|
@ -363,6 +364,7 @@ OPCODE(BoundImageSampleDrefImplicitLod, F32, U32,
|
|||
OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
|
||||
OPCODE(BoundImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
|
||||
OPCODE(BoundImageFetch, F32x4, U32, Opaque, U32, U32, )
|
||||
|
||||
OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
|
@ -370,6 +372,7 @@ OPCODE(ImageSampleDrefImplicitLod, F32, U32,
|
|||
OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, )
|
||||
OPCODE(ImageGather, F32x4, U32, Opaque, Opaque, Opaque, )
|
||||
OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, )
|
||||
OPCODE(ImageFetch, F32x4, U32, Opaque, U32, U32, )
|
||||
|
||||
// Warp operations
|
||||
OPCODE(VoteAll, U1, U1, )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue