--- vec.h.orig 2010-09-06 17:22:21.692873141 +0200 +++ vec.h 2010-09-06 17:23:08.592872987 +0200 @@ -55,12 +55,7 @@ // Rendering flags #define RFLAGS_DISABLE_DIFFUSE_PATH 1 -// NOTE: workaround for an Apple OpenCL compiler bug -#ifdef __APPLE__ -#define OCL_CONSTANT_BUFFER __global -#else #define OCL_CONSTANT_BUFFER __constant -#endif #endif /* _VEC_H */ --- geomfunc.h.orig 2010-09-06 17:23:49.224121784 +0200 +++ geomfunc.h 2010-09-06 17:24:38.442871883 +0200 @@ -79,8 +79,7 @@ unsigned int *id) { float inf = (*t) = 1e20f; - unsigned int i = sphereCount; - for (; i--;) { + for (unsigned int i = 0; i < sphereCount; i++) { const float d = SphereIntersect(&spheres[i], r); if ((d != 0.f) && (d < *t)) { *t = d;