http://bugs.freedesktop.org/show_bug.cgi?id=21872
--- Comment #4 from Brad King <brad.k...@kitware.com> 2009-06-16 06:54:03 PST --- Yes, that works. Taking the range shift to an extreme, we can handle almost the entire range with the code below. However, it adds an extra divide instruction since B is not known at compile time, so yours is probably better. /** * If A is a signed integer, A % B doesn't give the right value for A < 0 * (in terms of texture repeat). We make A positive by adding a large * multiple of B to shift the entire range of GLint into that of GLuint * (except possibly the most negative partial block). */ #define OFFSET(B) ((((GLuint)0x10000000u)/(B))*(B)) #define REMAINDER(A, B) (((A) + OFFSET(B)) % (B)) -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev