Cycles: remove extended precision hacks, no longer needed with SSE2 requirement.

Differential Revision: https://developer.blender.org/D2079
This commit is contained in:
Brecht Van Lommel
2016-07-04 16:43:32 +02:00
parent 1ba90582f5
commit 39ae324918
7 changed files with 82 additions and 101 deletions

View File

@@ -26,16 +26,6 @@ CCL_NAMESPACE_BEGIN
static const int BVH_SORT_THRESHOLD = 4096;
/* Silly workaround for float extended precision that happens when compiling
* on x86, due to one float staying in 80 bit precision register and the other
* not, which causes the strictly weak ordering to break.
*/
#if !defined(__i386__)
# define NO_EXTENDED_PRECISION
#else
# define NO_EXTENDED_PRECISION volatile
#endif
struct BVHReferenceCompare {
public:
int dim;
@@ -52,8 +42,8 @@ public:
__forceinline int compare(const BVHReference& ra,
const BVHReference& rb) const
{
NO_EXTENDED_PRECISION float ca = ra.bounds().min[dim] + ra.bounds().max[dim];
NO_EXTENDED_PRECISION float cb = rb.bounds().min[dim] + rb.bounds().max[dim];
float ca = ra.bounds().min[dim] + ra.bounds().max[dim];
float cb = rb.bounds().min[dim] + rb.bounds().max[dim];
if(ca < cb) return -1;
else if(ca > cb) return 1;