Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
[deleted comment]
[deleted comment]
1. Sample(), SampleBias(), SampleCmp() call ddx/ddy. They are not allowed
inside branch.
2. SampleLevel(), SampleGrad(), SampleCmpLevelZero(), Load() work with branch.
3. A package runs in SIMD. It flatten the branch when needed.
Original comment by minmin.gong
on 28 Nov 2011 at 3:44
Original comment by wuye9036
on 28 Nov 2011 at 2:47
The hardware way is:
1. Divide a stream into packages.
2. Elements inside a package runs in SIMD. Branches in a package are flattened
(Loops are unrolled). Both if and else block are run and mask the results.
3. Branches between packages are in real branch. No performance penalty here.
4. DDX/DDY are calculated inside a package.
We can also follow these rules. It's the simplest and efficient way for
branching/looping.
Original comment by minmin.gong
on 29 Nov 2011 at 8:54
Original comment by wuye9036
on 14 Dec 2011 at 9:00
Original comment by wuye9036
on 14 Dec 2011 at 9:03
Original comment by wuye9036
on 15 Dec 2011 at 3:15
Original comment by wuye9036
on 5 Mar 2012 at 12:20
Original comment by wuye9036
on 7 Mar 2012 at 3:08
Original comment by wuye9036
on 13 Dec 2012 at 4:28
Original comment by wuye9036
on 13 Dec 2012 at 5:37
Original issue reported on code.google.com by
wuye9036
on 7 Nov 2011 at 9:47