[clang] [llvm] [HLSL] Implement ddx and ddy HLSL intrinsics (PR #168887)
Alexander Johnston via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 16:47:45 PST 2025
Alexander-Johnston wrote:
> Looking at your similar PR (#168874), do you also need to add SPIRV::OpDPdy and SPIRV::OpDPdx to https://github.com/llvm/llvm-project/pull/168874/files#diff-ba9921ea1bab49f211b472854e8609ffc38debd428641ebd1b68512314ab9b6dR2155
A good catch! I had to check, but looking at https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Derivative it seems the "generic" derivative instructions limit their requirements to Fragment shaders. Only the Fine and Coarse variants add the requirement for DerivativeControl.
For extra assurance, I believe the validator call in the SPIRV Codegen tests would fail should DerivativeControl need to be present in this case.
https://github.com/llvm/llvm-project/pull/168887
More information about the llvm-commits
mailing list