[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52250] trunk/lib/windows/osl: Windows Lib : static OSL libraries and oslc.

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Nov 15 21:00:45 CET 2012


Revision: 52250
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52250
Author:   blendix
Date:     2012-11-15 20:00:44 +0000 (Thu, 15 Nov 2012)
Log Message:
-----------
Windows Lib: static OSL libraries and oslc.

Added Paths:
-----------
    trunk/lib/windows/osl/LICENSE
    trunk/lib/windows/osl/bin/
    trunk/lib/windows/osl/bin/oslc.exe
    trunk/lib/windows/osl/bin/zlib.dll
    trunk/lib/windows/osl/include/
    trunk/lib/windows/osl/include/OSL/
    trunk/lib/windows/osl/include/OSL/Imathx.h
    trunk/lib/windows/osl/include/OSL/accum.h
    trunk/lib/windows/osl/include/OSL/dual.h
    trunk/lib/windows/osl/include/OSL/dual_vec.h
    trunk/lib/windows/osl/include/OSL/export.h
    trunk/lib/windows/osl/include/OSL/genclosure.h
    trunk/lib/windows/osl/include/OSL/matrix22.h
    trunk/lib/windows/osl/include/OSL/optautomata.h
    trunk/lib/windows/osl/include/OSL/oslclosure.h
    trunk/lib/windows/osl/include/OSL/oslcomp.h
    trunk/lib/windows/osl/include/OSL/oslconfig.h
    trunk/lib/windows/osl/include/OSL/oslexec.h
    trunk/lib/windows/osl/include/OSL/oslquery.h
    trunk/lib/windows/osl/include/OSL/oslversion.h
    trunk/lib/windows/osl/lib/
    trunk/lib/windows/osl/lib/oslcomp.lib
    trunk/lib/windows/osl/lib/oslexec.lib
    trunk/lib/windows/osl/lib/oslquery.lib

Added: trunk/lib/windows/osl/LICENSE
===================================================================
--- trunk/lib/windows/osl/LICENSE	                        (rev 0)
+++ trunk/lib/windows/osl/LICENSE	2012-11-15 20:00:44 UTC (rev 52250)
@@ -0,0 +1,25 @@
+Copyright (c) 2009-2012 Sony Pictures Imageworks Inc., et al.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+* Neither the name of Sony Pictures Imageworks nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: trunk/lib/windows/osl/bin/oslc.exe
===================================================================
(Binary files differ)


Property changes on: trunk/lib/windows/osl/bin/oslc.exe
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/lib/windows/osl/bin/zlib.dll
===================================================================
(Binary files differ)


Property changes on: trunk/lib/windows/osl/bin/zlib.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/lib/windows/osl/include/OSL/Imathx.h
===================================================================
--- trunk/lib/windows/osl/include/OSL/Imathx.h	                        (rev 0)
+++ trunk/lib/windows/osl/include/OSL/Imathx.h	2012-11-15 20:00:44 UTC (rev 52250)
@@ -0,0 +1,99 @@
+/*
+Copyright (c) 2012 Sony Pictures Imageworks Inc., et al.
+and
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+* Neither the name of Sony Pictures Imageworks nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+// Extensions to Imath classes for use in OSL's internals.
+// 
+// The original Imath classes bear the "new BSD" license (same as
+// ours above) and this copyright:
+// Copyright (c) 2002, Industrial Light & Magic, a division of
+// Lucas Digital Ltd. LLC.  All rights reserved.
+
+
+#ifndef IMATHX_H
+#define IMATHX_H
+
+
+#include <OpenEXR/ImathVec.h>
+#include <OpenEXR/ImathMatrix.h>
+#include <OpenEXR/ImathColor.h>
+
+#include "matrix22.h"
+
+
+OSL_NAMESPACE_ENTER
+
+
+/// 3x3 matrix transforming a 3-vector.  This is curiously not supplied
+/// by Imath, so we define it ourselves.
+template <class S, class T>
+inline void
+multMatrix (const Imath::Matrix33<T> &M, const Imath::Vec3<S> &src,
+            Imath::Vec3<S> &dst)
+{
+    S a = src[0] * M[0][0] + src[1] * M[1][0] + src[2] * M[2][0];
+    S b = src[0] * M[0][1] + src[1] * M[1][1] + src[2] * M[2][1];
+    S c = src[0] * M[0][2] + src[1] * M[1][2] + src[2] * M[2][2];
+    dst[0] = a;
+    dst[1] = b;
+    dst[2] = c;
+}
+
+
+/// Express dot product as a function rather than a method.
+template<class T>
+inline T
+dot (const Imath::Vec2<T> &a, const Imath::Vec2<T> &b)
+{
+    return a.dot (b);
+}
+
+
+/// Express dot product as a function rather than a method.
+template<class T>
+inline T
+dot (const Imath::Vec3<T> &a, const Imath::Vec3<T> &b)
+{
+    return a.dot (b);
+}
+
+
+
+/// Return the determinant of a 2x2 matrix.
+template <class T>
+inline
+T determinant (const Imathx::Matrix22<T> &m)
+{
+    return m[0][0]*m[1][1] - m[0][1]*m[1][0];
+}
+
+
+OSL_NAMESPACE_EXIT
+
+#endif /* ifndef(IMATHX_H) */

Added: trunk/lib/windows/osl/include/OSL/accum.h
===================================================================
--- trunk/lib/windows/osl/include/OSL/accum.h	                        (rev 0)
+++ trunk/lib/windows/osl/include/OSL/accum.h	2012-11-15 20:00:44 UTC (rev 52250)
@@ -0,0 +1,249 @@
+/*
+Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+* Neither the name of Sony Pictures Imageworks nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef ACCUM_H
+#define ACCUM_H
+
+#include "oslconfig.h"
+#include "optautomata.h"
+#include <list>
+#include <stack>
+
+OSL_NAMESPACE_ENTER
+
+class Aov
+{
+    public:
+        virtual void write(void *flush_data, Color3 &color, float alpha,
+                           bool has_color, bool has_alpha) = 0;
+};
+
+/// AOV slot where the integrator will write to
+///
+/// This is the end point of the output before going to
+/// the AOV. These objects are owned by the Accumulator
+/// class and there is going to be exactly one for each
+/// active AOV. These objects should be reset before the
+/// integration ray walk for a pixel and flushed at the end
+struct AovOutput
+{
+    AovOutput():neg_color(false),neg_alpha(false),aov(NULL) {};
+
+    // Accumulated values
+    Color3      color;
+    float       alpha;
+    // whether there has been some value added to color
+    bool    has_color;
+    // whether there has been some value added to alpha
+    bool    has_alpha;
+    // It is also possible to "invert" values before flushing
+    bool    neg_color;
+    bool    neg_alpha;
+    // The abstract AOV to send the data to
+    Aov          *aov;
+
+    // Reset the accumulated value to start a new integration
+    void reset()
+    {
+        color.setValue(0, 0, 0);
+        alpha = 0.0f;
+        has_alpha = has_color = false;
+    };
+    /// Sends the color information to the AOV
+    void flush(void *flush_data);
+};
+
+
+
+/// Rule mapping a pattern to an AOV
+///
+/// This is the entity being linked from the automata. At any state, if
+/// it is final, you will find pointers to these objects. They already know
+/// what output to use and how. Multiple rules can point to the same AOV.
+class OSLEXECPUBLIC AccumRule
+{
+    public:
+        /// Create a rule for accumulating results to an AOV
+        ///
+        ///  \param out_idx      output index that this rule should be writing to
+        ///  \param only_source When accumulating don't apply the viewer filter, just the
+        ///                            source value
+        ///  \param toalpha      Convert value and pack to the alpha channel of the AOV
+        ///  \param neg            Invert (1 - v) the value before sending to the AOV
+        ///
+        AccumRule(int outidx, bool toalpha):
+                            m_outidx(outidx),
+                            m_save_to_alpha(toalpha) { };
+
+        /// Called to accumulate from AccumAutomata. It will select the right ouput from
+        /// the given vector based in the AOV index number (they are guaranteed to match)
+        void accum(const Color3 &color, std::vector<AovOutput> &outputs)const;
+
+        // This link information is actually not used inside of this class for other thing

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list