Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-01 23:15:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-01 23:15:05 +0400
commit7c0a0bae79bb8f842a575fe83975c6d34d73c64a (patch)
tree844857e85903601f60a083d767d6317f3006d31f /intern/cycles/kernel/osl/osl_shader.h
parent807fd448a557fbacb70fcd9b5cae76529fdb9b80 (diff)
Fix #33375: OSL geom:trianglevertices gave wrong coordinates for static BVH.
Also some simple OSL optimization, passing thread data pointer directly instead of via thread local storage, and creating ustrings for attribute lookup.
Diffstat (limited to 'intern/cycles/kernel/osl/osl_shader.h')
-rw-r--r--intern/cycles/kernel/osl/osl_shader.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/intern/cycles/kernel/osl/osl_shader.h b/intern/cycles/kernel/osl/osl_shader.h
index 9ff31e9160b..e614f240dc1 100644
--- a/intern/cycles/kernel/osl/osl_shader.h
+++ b/intern/cycles/kernel/osl/osl_shader.h
@@ -31,33 +31,27 @@
* This means no thread state must be passed along in the kernel itself.
*/
-#include <OSL/oslexec.h>
-#include <OSL/oslclosure.h>
-
#include "kernel_types.h"
-#include "util_map.h"
-#include "util_param.h"
-#include "util_vector.h"
-
CCL_NAMESPACE_BEGIN
-namespace OSL = ::OSL;
-
-class OSLRenderServices;
class Scene;
+
struct ShaderClosure;
struct ShaderData;
struct differential3;
struct KernelGlobals;
+struct OSLGlobals;
+struct OSLShadingSystem;
+
class OSLShader {
public:
/* init */
- static void register_closures(OSL::ShadingSystem *ss);
+ static void register_closures(OSLShadingSystem *ss);
/* per thread data */
- static void thread_init(KernelGlobals *kg);
+ static void thread_init(KernelGlobals *kg, KernelGlobals *kernel_globals, OSLGlobals *osl_globals);
static void thread_free(KernelGlobals *kg);
/* eval */
@@ -82,6 +76,9 @@ public:
/* release */
static void init(KernelGlobals *kg, ShaderData *sd);
static void release(KernelGlobals *kg, ShaderData *sd);
+
+ /* attributes */
+ static int find_attribute(KernelGlobals *kg, const ShaderData *sd, uint id);
};
CCL_NAMESPACE_END