File tree 3 files changed +12
-9
lines changed
crates/spirv-std/src/arch
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 {
19
19
}
20
20
21
21
/// 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.
22
25
pub unsafe trait Derivative : Sealed + Default {
23
26
/// Result is the partial derivative of `Self` with respect to the window x coordinate. Uses local differencing
24
27
/// 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 1
1
%1 = OpFunction %2 None %3
2
2
%4 = OpLabel
3
- OpLine %5 34 8
3
+ OpLine %5 37 8
4
4
%6 = OpDPdx %7 %8
5
- OpLine %5 76 8
5
+ OpLine %5 79 8
6
6
%9 = OpDPdy %7 %8
7
- OpLine %5 116 8
7
+ OpLine %5 119 8
8
8
%10 = OpFwidth %7 %8
9
9
OpNoLine
10
10
OpReturn
Original file line number Diff line number Diff line change 1
1
%1 = OpFunction %2 None %3
2
2
%4 = OpLabel
3
- OpLine %5 47 8
3
+ OpLine %5 50 8
4
4
%6 = OpDPdxFine %7 %8
5
- OpLine %5 89 8
5
+ OpLine %5 92 8
6
6
%9 = OpDPdyFine %7 %8
7
- OpLine %5 128 8
7
+ OpLine %5 131 8
8
8
%10 = OpFwidthFine %7 %8
9
- OpLine %5 62 8
9
+ OpLine %5 65 8
10
10
%11 = OpDPdxCoarse %7 %8
11
- OpLine %5 104 8
11
+ OpLine %5 107 8
12
12
%12 = OpDPdyCoarse %7 %8
13
- OpLine %5 140 8
13
+ OpLine %5 143 8
14
14
%13 = OpFwidthCoarse %7 %8
15
15
OpNoLine
16
16
OpReturn
You can’t perform that action at this time.
0 commit comments