[clang] [llvm] [HLSL] Implement the `reflect` HLSL function (PR #122992)
Deric Cheung via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 10:09:31 PST 2025
================
@@ -3030,6 +3031,15 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract);
case Intrinsic::spv_normalize:
return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize);
+ case Intrinsic::spv_reflect:
+ if (!STI.canUseExtInstSet(SPIRV::InstructionSet::InstructionSet::GLSL_std_450)) {
----------------
Icohedron wrote:
Should I add a similar conditional to the OpenCL overloaded version of selectExtInst? Just to keep the OpenCL and GLSL functions similar.
https://github.com/llvm/llvm-project/pull/122992
More information about the llvm-commits
mailing list