diff options
| author | Yong He <yonghe@outlook.com> | 2025-03-06 14:26:34 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 14:26:34 -0800 |
| commit | 4485cf3eaf142cfd5f8470e86739acc67d4e12ea (patch) | |
| tree | c6ce220dfe5f3ab25ea558f2512f3761c9565c69 /source/slang/slang-emit-spirv-ops.h | |
| parent | 55dd2deaff82bbdb72e125ba4b350030b7e5f427 (diff) | |
Update SPIRV-Tools and fix new validation errors. (#6511)
* Update SPIRV-Tools and fix new validation errors.
* Implement pointers for glsl target.
* Reworked packStorage/unpackStorage code gen to operate on pointers rather than values.
Diffstat (limited to 'source/slang/slang-emit-spirv-ops.h')
| -rw-r--r-- | source/slang/slang-emit-spirv-ops.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang-emit-spirv-ops.h b/source/slang/slang-emit-spirv-ops.h index 8c5316f51..880f6b083 100644 --- a/source/slang/slang-emit-spirv-ops.h +++ b/source/slang/slang-emit-spirv-ops.h @@ -1409,6 +1409,20 @@ SpvInst* emitOpBitcast( return emitInst(parent, inst, SpvOpBitcast, idResultType, kResultID, operand); } +// https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpCopyLogical +template<typename T1, typename T2> +SpvInst* emitOpCopyLogical( + SpvInstParent* parent, + IRInst* inst, + const T1& idResultType, + const T2& operand) +{ + static_assert(isSingular<T1>); + static_assert(isSingular<T2>); + return emitInst(parent, inst, SpvOpCopyLogical, idResultType, kResultID, operand); +} + + // https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpSNegate template<typename T1, typename T2> SpvInst* emitOpSNegate( |
