What is the reason of updating OSL from 1.4.0 to 1.4.1 and should other platforms also be updated?
On Tue, Dec 31, 2013 at 1:35 AM, Thomas Dinges <[email protected]> wrote: > Revision: 61262 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61262 > Author: dingto > Date: 2013-12-30 19:35:50 +0000 (Mon, 30 Dec 2013) > Log Message: > ----------- > MSVC 2008 x64: > * Update OSL to 1.4.1. > > Release 1.4.1 - 19 Dec 2013 (compared to 1.4.0) > ----------------------------------------------- > * Guard matrix*point transformations against possible division by zero. > * Fix subtle bug with splines taking arrays, where the number of knots > passed was less than the full length of the array, and the knots had > derivatives -- the derivatives would be looked up from the wrong spot > in the array (and could read uninitialized portions of the array). > * testshade/testrender - Fix timer call that wasn't correctly reporting > execution time versus total time. > * Fix incorrect function declarations for the no-bitcode case (only > affected Windows or if a site purposely built without precompiled > bitcode for llvm_ops.cpp). > * Build: more robust detection of clang, for older cmake versions. > * Build: handle 3-part version numbers for LLVM installations. > * Build: Fix USE_EXTERNAL_PUGIXML versus USING_OIIO_PUGI issue. > > Modified Paths: > -------------- > trunk/lib/win64/osl/CHANGES > trunk/lib/win64/osl/bin/oslc.exe > trunk/lib/win64/osl/include/OSL/dual_vec.h > trunk/lib/win64/osl/include/OSL/oslversion.h > trunk/lib/win64/osl/lib/oslcomp.lib > trunk/lib/win64/osl/lib/oslexec.lib > trunk/lib/win64/osl/lib/oslquery.lib > > Modified: trunk/lib/win64/osl/CHANGES > =================================================================== > --- trunk/lib/win64/osl/CHANGES 2013-12-28 22:14:56 UTC (rev 61261) > +++ trunk/lib/win64/osl/CHANGES 2013-12-30 19:35:50 UTC (rev 61262) > @@ -1,3 +1,21 @@ > +Release 1.4.1 - 19 Dec 2013 (compared to 1.4.0) > +----------------------------------------------- > +* Guard matrix*point transformations against possible division by zero. > +* Fix subtle bug with splines taking arrays, where the number of knots > + passed was less than the full length of the array, and the knots had > + derivatives -- the derivatives would be looked up from the wrong spot > + in the array (and could read uninitialized portions of the array). > +* testshade/testrender - Fix timer call that wasn't correctly reporting > + execution time versus total time. > +* Fix incorrect function declarations for the no-bitcode case (only > + affected Windows or if a site purposely built without precompiled > + bitcode for llvm_ops.cpp). > +* Build: more robust detection of clang, for older cmake versions. > +* Build: handle 3-part version numbers for LLVM installations. > +* Build: Fix USE_EXTERNAL_PUGIXML versus USING_OIIO_PUGI issue. > + > + > + > Release 1.4.0 - 25 November 2013 (compared to 1.3) > -------------------------------------------------- > > > Modified: trunk/lib/win64/osl/bin/oslc.exe > =================================================================== > (Binary files differ) > > Modified: trunk/lib/win64/osl/include/OSL/dual_vec.h > =================================================================== > --- trunk/lib/win64/osl/include/OSL/dual_vec.h 2013-12-28 22:14:56 UTC > (rev 61261) > +++ trunk/lib/win64/osl/include/OSL/dual_vec.h 2013-12-30 19:35:50 UTC > (rev 61262) > @@ -138,21 +138,49 @@ > dst = make_Vec3 (a, b, c); > } > > +inline void robust_multVecMatrix(const Matrix44& x, const > Imath::Vec3<float>& src, Imath::Vec3<float>& dst) > +{ > + float a = src[0] * x[0][0] + src[1] * x[1][0] + src[2] * x[2][0] + > x[3][0]; > + float b = src[0] * x[0][1] + src[1] * x[1][1] + src[2] * x[2][1] + > x[3][1]; > + float c = src[0] * x[0][2] + src[1] * x[1][2] + src[2] * x[2][2] + > x[3][2]; > + float w = src[0] * x[0][3] + src[1] * x[1][3] + src[2] * x[2][3] + > x[3][3]; > > + if (w != 0) { > + dst.x = a / w; > + dst.y = b / w; > + dst.z = c / w; > + } else { > + dst.x = 0; > + dst.y = 0; > + dst.z = 0; > + } > +} > > /// Multiply a matrix times a vector with derivatives to obtain > /// a transformed vector with derivatives. > inline void > -multVecMatrix (const Matrix44 &M, Dual2<Vec3> &in, Dual2<Vec3> &out) > +robust_multVecMatrix (const Matrix44 &M, const Dual2<Vec3> &in, > Dual2<Vec3> &out) > { > // Rearrange into a Vec3<Dual2<float> > > Imath::Vec3<Dual2<float> > din, dout; > for (int i = 0; i < 3; ++i) > din[i].set (in.val()[i], in.dx()[i], in.dy()[i]); > > - // N.B. the following function has a divide by 'w' > - M.multVecMatrix (din, dout); > + Dual2<float> a = din[0] * M[0][0] + din[1] * M[1][0] + din[2] * > M[2][0] + M[3][0]; > + Dual2<float> b = din[0] * M[0][1] + din[1] * M[1][1] + din[2] * > M[2][1] + M[3][1]; > + Dual2<float> c = din[0] * M[0][2] + din[1] * M[1][2] + din[2] * > M[2][2] + M[3][2]; > + Dual2<float> w = din[0] * M[0][3] + din[1] * M[1][3] + din[2] * > M[2][3] + M[3][3]; > > + if (w.val() != 0) { > + dout.x = a / w; > + dout.y = b / w; > + dout.z = c / w; > + } else { > + dout.x = 0; > + dout.y = 0; > + dout.z = 0; > + } > + > // Rearrange back into Dual2<Vec3> > out.set (Vec3 (dout[0].val(), dout[1].val(), dout[2].val()), > Vec3 (dout[0].dx(), dout[1].dx(), dout[2].dx()), > > Modified: trunk/lib/win64/osl/include/OSL/oslversion.h > =================================================================== > --- trunk/lib/win64/osl/include/OSL/oslversion.h 2013-12-28 > 22:14:56 UTC (rev 61261) > +++ trunk/lib/win64/osl/include/OSL/oslversion.h 2013-12-30 > 19:35:50 UTC (rev 61262) > @@ -43,7 +43,7 @@ > // Version of this library: > #define OSL_LIBRARY_VERSION_MAJOR 1 > #define OSL_LIBRARY_VERSION_MINOR 4 > -#define OSL_LIBRARY_VERSION_PATCH 0 > +#define OSL_LIBRARY_VERSION_PATCH 1 > #define OSL_LIBRARY_VERSION_RELEASE_TYPE > > #define OSL_LIBRARY_VERSION_CODE (10000 * OSL_LIBRARY_VERSION_MAJOR + \ > > Modified: trunk/lib/win64/osl/lib/oslcomp.lib > =================================================================== > (Binary files differ) > > Modified: trunk/lib/win64/osl/lib/oslexec.lib > =================================================================== > (Binary files differ) > > Modified: trunk/lib/win64/osl/lib/oslquery.lib > =================================================================== > (Binary files differ) > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > -- With best regards, Sergey Sharybin _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
