File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
crates/spirv-std/src/arch Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ macro_rules! deriv_fn {
1919}
2020
2121/// Types that can be derived by partial derivatives
22+ ///
23+ /// # Safety
24+ /// Result Type must be a scalar or vector of floating-point type using the IEEE 754 encoding. The component width must be 32 bits.
2225pub unsafe trait Derivative : Sealed + Default {
2326 /// Result is the partial derivative of `Self` with respect to the window x coordinate. Uses local differencing
2427 /// based on the value of `Self`. Same result as either [`Self::dfdx_fine`] or [`Self::dfdx_coarse`] on `Self`. Selection of which
Original file line number Diff line number Diff line change 11%1 = OpFunction %2 None %3
22%4 = OpLabel
3- OpLine %5 34 8
3+ OpLine %5 37 8
44%6 = OpDPdx %7 %8
5- OpLine %5 76 8
5+ OpLine %5 79 8
66%9 = OpDPdy %7 %8
7- OpLine %5 116 8
7+ OpLine %5 119 8
88%10 = OpFwidth %7 %8
99OpNoLine
1010OpReturn
Original file line number Diff line number Diff line change 11%1 = OpFunction %2 None %3
22%4 = OpLabel
3- OpLine %5 47 8
3+ OpLine %5 50 8
44%6 = OpDPdxFine %7 %8
5- OpLine %5 89 8
5+ OpLine %5 92 8
66%9 = OpDPdyFine %7 %8
7- OpLine %5 128 8
7+ OpLine %5 131 8
88%10 = OpFwidthFine %7 %8
9- OpLine %5 62 8
9+ OpLine %5 65 8
1010%11 = OpDPdxCoarse %7 %8
11- OpLine %5 104 8
11+ OpLine %5 107 8
1212%12 = OpDPdyCoarse %7 %8
13- OpLine %5 140 8
13+ OpLine %5 143 8
1414%13 = OpFwidthCoarse %7 %8
1515OpNoLine
1616OpReturn
You can’t perform that action at this time.
0 commit comments