deterministic rasterization

Summary: Attempt to fix #659, an observation that the rasterizer is nondeterministic, by resolving tied faces by picking those with lower index.

Reviewed By: nikhilaravi, patricklabatut

Differential Revision: D30699039

fbshipit-source-id: 39ed797eb7e9ce7370ae71259ad6b757f9449923
This commit is contained in:
Jeremy Reizenstein
2021-09-23 06:57:11 -07:00
committed by Facebook GitHub Bot
parent cb170ac024
commit 860b742a02
3 changed files with 24 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ struct Pixel {
};
__device__ bool operator<(const Pixel& a, const Pixel& b) {
return a.z < b.z;
return a.z < b.z || (a.z == b.z && a.idx < b.idx);
}
// Get the xyz coordinates of the three vertices for the face given by the