summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-spirv-ops.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-10-02 03:33:58 -0700
committerGitHub <noreply@github.com>2023-10-02 18:33:58 +0800
commitccf2611c024ab12dcccd978f3f501d4ee9fc52bc (patch)
treef4df843e3b46886005d6bfbae34dc3bcc6fb8321 /source/slang/slang-emit-spirv-ops.h
parent6138de5f084cafdc98381237c2d8bed7c8804f1c (diff)
Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)
* Add SPIRV intrinsics for ShaderExecutionReordering. * Add intrinsics for `Buffer` and `RWBuffer`. * Various spirv fixes. * Marshal bool vector type. * Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-spirv-ops.h')
-rw-r--r--source/slang/slang-emit-spirv-ops.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-emit-spirv-ops.h b/source/slang/slang-emit-spirv-ops.h
index 9bd645e5d..f64fc7f9a 100644
--- a/source/slang/slang-emit-spirv-ops.h
+++ b/source/slang/slang-emit-spirv-ops.h
@@ -311,6 +311,13 @@ SpvInst* emitOpTypeRayQuery(IRInst* inst)
);
}
+SpvInst* emitOpTypeHitObject(IRInst* inst)
+{
+ return emitInstMemoized(
+ getSection(SpvLogicalSectionID::ConstantsAndTypes), inst, SpvOpTypeHitObjectNV, kResultID
+ );
+}
+
// https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpTypeArray
template<typename T1, typename T2>
SpvInst* emitOpTypeArray(IRInst* inst, const T1& elementType, const T2& length)