From 164dfbeb5039f5ac6c95d331049f7ea20ef5edef Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 11 Feb 2016 13:57:39 +0100 Subject: Cycles: Remove some ifdefs for OSL < 1.7.1. That means that we now only support OSL 1.7.1 or newer. Please update libs or re-run install-depsh.sh. --- intern/cycles/kernel/osl/osl_closures.h | 7 ------- intern/cycles/kernel/osl/osl_shader.cpp | 12 ------------ 2 files changed, 19 deletions(-) (limited to 'intern/cycles/kernel') diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index 526c03557f7..1578d06cd56 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -80,11 +80,6 @@ void name(RendererServices *, int id, void *data) \ #define TO_COLOR3(v) OSL::Color3(v.x, v.y, v.z) #define TO_FLOAT3(v) make_float3(v[0], v[1], v[2]) -#if OSL_LIBRARY_VERSION_CODE < 10700 -# undef CLOSURE_STRING_KEYPARAM -# define CLOSURE_STRING_KEYPARAM(st, fld, key) { TypeDesc::TypeString, 0, key, 0 } -#endif - /* Closure */ class CClosurePrimitive { @@ -105,9 +100,7 @@ public: Category category; -#if OSL_LIBRARY_VERSION_CODE >= 10700 OSL::ustring label; -#endif }; /* BSDF */ diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index 361a88548bd..f58368e6789 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -147,11 +147,7 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag, /* OSL gives us a closure tree, we flatten it into arrays per * closure type, for evaluation, sampling, etc later on. */ -#if OSL_LIBRARY_VERSION_CODE < 10700 - switch(closure->type) { -#else switch(closure->id) { -#endif case OSL::ClosureColor::MUL: { OSL::ClosureMul *mul = (OSL::ClosureMul *)closure; flatten_surface_closure_tree(sd, path_flag, mul->closure, TO_FLOAT3(mul->weight) * weight); @@ -355,11 +351,7 @@ static float3 flatten_background_closure_tree(const OSL::ClosureColor *closure) * is only one supported closure type at the moment, which has no evaluation * functions, so we just sum the weights */ -#if OSL_LIBRARY_VERSION_CODE < 10700 - switch(closure->type) { -#else switch(closure->id) { -#endif case OSL::ClosureColor::MUL: { OSL::ClosureMul *mul = (OSL::ClosureMul *)closure; @@ -417,11 +409,7 @@ static void flatten_volume_closure_tree(ShaderData *sd, /* OSL gives us a closure tree, we flatten it into arrays per * closure type, for evaluation, sampling, etc later on. */ -#if OSL_LIBRARY_VERSION_CODE < 10700 - switch(closure->type) { -#else switch(closure->id) { -#endif case OSL::ClosureColor::MUL: { OSL::ClosureMul *mul = (OSL::ClosureMul *)closure; flatten_volume_closure_tree(sd, mul->closure, TO_FLOAT3(mul->weight) * weight); -- cgit v1.2.3