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@gmail.com>2019-05-14 13:13:43 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-14 13:24:15 +0300
commitb50cf33d917b3e0fe7152cff96996e5a850c68d4 (patch)
tree775a7e8a6129e634d8a4982671fa0999a76444e7 /intern/cycles/render/osl.h
parent9fecac32d9e9f3e6dd69f89fe4ceaddcecaf1277 (diff)
Fix T64515, T60434: crash in OSL and preview render after recent changes
The refactoring of texture handles did not take into account that render services are shared between multiple render session. Now the texture to handle map is also shared between render sessions.
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r--intern/cycles/render/osl.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index ac73f1d3c24..17bf98a3433 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -127,12 +127,14 @@ class OSLShaderManager : public ShaderManager {
class OSLCompiler {
public:
- OSLCompiler(void *manager,
- void *shadingsys,
- OSLGlobals *osl_globals,
+#ifdef WITH_OSL
+ OSLCompiler(OSLShaderManager *manager,
+ OSLRenderServices *services,
+ OSL::ShadingSystem *shadingsys,
ImageManager *image_manager,
LightManager *light_manager);
- void compile(Scene *scene, Shader *shader);
+#endif
+ void compile(Scene *scene, OSLGlobals *og, Shader *shader);
void add(ShaderNode *node, const char *name, bool isfilepath = false);
@@ -176,13 +178,16 @@ class OSLCompiler {
void find_dependencies(ShaderNodeSet &dependencies, ShaderInput *input);
void generate_nodes(const ShaderNodeSet &nodes);
+
+ OSLShaderManager *manager;
+ OSLRenderServices *services;
+ OSL::ShadingSystem *ss;
#endif
- void *shadingsys;
- void *manager;
- OSLGlobals *osl_globals;
ShaderType current_type;
Shader *current_shader;
+
+ static int texture_shared_unique_id;
};
CCL_NAMESPACE_END