diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 13:13:43 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 13:24:15 +0300 |
commit | b50cf33d917b3e0fe7152cff96996e5a850c68d4 (patch) | |
tree | 775a7e8a6129e634d8a4982671fa0999a76444e7 /intern/cycles/kernel/osl/osl_closures.h | |
parent | 9fecac32d9e9f3e6dd69f89fe4ceaddcecaf1277 (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/kernel/osl/osl_closures.h')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index 9de1e036194..d3db6b71f5c 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -42,8 +42,6 @@ CCL_NAMESPACE_BEGIN -struct KernelGlobals; - OSL::ClosureParam *closure_emission_params(); OSL::ClosureParam *closure_background_params(); OSL::ClosureParam *closure_holdout_params(); @@ -113,7 +111,7 @@ void closure_bsdf_principled_hair_prepare(OSL::RendererServices *, int id, void class CClosurePrimitive { public: - virtual void setup(const KernelGlobals *kg, ShaderData *sd, int path_flag, float3 weight) = 0; + virtual void setup(ShaderData *sd, int path_flag, float3 weight) = 0; OSL::ustring label; }; @@ -122,7 +120,7 @@ class CClosurePrimitive { class CBSDFClosure : public CClosurePrimitive { public: - bool skip(const KernelGlobals *kg, const ShaderData *sd, int path_flag, int scattering); + bool skip(const ShaderData *sd, int path_flag, int scattering); }; #define BSDF_CLOSURE_CLASS_BEGIN(Upper, lower, structname, TYPE) \ @@ -132,9 +130,9 @@ class CBSDFClosure : public CClosurePrimitive { structname params; \ float3 unused; \ \ - void setup(const KernelGlobals *kg, ShaderData *sd, int path_flag, float3 weight) \ + void setup(ShaderData *sd, int path_flag, float3 weight) \ { \ - if (!skip(kg, sd, path_flag, TYPE)) { \ + if (!skip(sd, path_flag, TYPE)) { \ structname *bsdf = (structname *)bsdf_alloc_osl(sd, sizeof(structname), weight, ¶ms); \ sd->flag |= (bsdf) ? bsdf_##lower##_setup(bsdf) : 0; \ } \ |