OpenCL + AMD adapt kernel to newer driver

This commit is contained in:
Martijn Berger 2014-04-07 14:01:31 +02:00
parent 5dc23e6df8
commit b224fbf2e7
2 changed files with 27 additions and 21 deletions

@ -85,27 +85,36 @@
#define __float_as_uint(x) as_uint(x) #define __float_as_uint(x) as_uint(x)
#define __int_as_float(x) as_float(x) #define __int_as_float(x) as_float(x)
#define __float_as_int(x) as_int(x) #define __float_as_int(x) as_int(x)
#define sqrtf(x) sqrt(((float)x))
#define cosf(x) cos(((float)x))
#define sinf(x) sin(((float)x))
#define powf(x, y) pow(((float)x), ((float)y)) #define powf(x, y) pow(((float)x), ((float)y))
#define fabsf(x) fabs(((float)x)) #define fabsf(x) fabs(((float)x))
#define copysignf(x, y) copysign(((float)x), ((float)y)) #define copysignf(x, y) copysign(((float)x), ((float)y))
#define cosf(x) cos(((float)x))
#define asinf(x) asin(((float)x)) #define asinf(x) asin(((float)x))
#define acosf(x) acos(((float)x)) #define acosf(x) acos(((float)x))
#define atanf(x) atan(((float)x)) #define atanf(x) atan(((float)x))
#define tanf(x) tan(((float)x))
#define logf(x) log(((float)x))
#define floorf(x) floor(((float)x)) #define floorf(x) floor(((float)x))
#define ceilf(x) ceil(((float)x)) #define ceilf(x) ceil(((float)x))
#define expf(x) exp(((float)x))
#define hypotf(x, y) hypot(((float)x), ((float)y)) #define hypotf(x, y) hypot(((float)x), ((float)y))
#define atan2f(x, y) atan2(((float)x), ((float)y)) #define atan2f(x, y) atan2(((float)x), ((float)y))
#define fmaxf(x, y) fmax(((float)x), ((float)y)) #define fmaxf(x, y) fmax(((float)x), ((float)y))
#define fminf(x, y) fmin(((float)x), ((float)y)) #define fminf(x, y) fmin(((float)x), ((float)y))
#define fmodf(x, y) fmod((float)x, (float)y) #define fmodf(x, y) fmod((float)x, (float)y)
#ifndef __CL_USE_NATIVE__
#define sinf(x) native_sin(((float)x))
#define cosf(x) native_cos(((float)x))
#define tanf(x) native_tan(((float)x))
#define expf(x) native_exp(((float)x))
#define sqrtf(x) native_sqrt(((float)x))
#define logf(x) native_log(((float)x))
#else
#define sinf(x) sin(((float)x))
#define cosf(x) cos(((float)x))
#define tanf(x) tan(((float)x))
#define expf(x) exp(((float)x))
#define sqrtf(x) sqrt(((float)x))
#define logf(x) log(((float)x))
#endif
/* data lookup defines */ /* data lookup defines */
#define kernel_data (*kg->data) #define kernel_data (*kg->data)
#define kernel_tex_fetch(t, index) kg->t[index] #define kernel_tex_fetch(t, index) kg->t[index]

@ -92,23 +92,20 @@ CCL_NAMESPACE_BEGIN
#endif #endif
#ifdef __KERNEL_OPENCL_AMD__ #ifdef __KERNEL_OPENCL_AMD__
#define __SVM__ #define __CL_USE_NATIVE__
#define __EMISSION__ #define __KERNEL_SHADING__
#define __IMAGE_TEXTURES__ //__KERNEL_ADV_SHADING__
#define __PROCEDURAL_TEXTURES__ #define __MULTI_CLOSURE__
#define __EXTRA_NODES__ #define __TRANSPARENT_SHADOWS__
#define __HOLDOUT__ #define __PASSES__
#define __NORMAL_MAP__ #define __BACKGROUND_MIS__
//#define __BACKGROUND_MIS__ #define __LAMP_MIS__
//#define __LAMP_MIS__ #define __AO__
//#define __AO__ #define __ANISOTROPIC__
//#define __ANISOTROPIC__
//#define __CAMERA_MOTION__ //#define __CAMERA_MOTION__
//#define __OBJECT_MOTION__ //#define __OBJECT_MOTION__
//#define __HAIR__ //#define __HAIR__
//#define __MULTI_CLOSURE__ //end __KERNEL_ADV_SHADING__
//#define __TRANSPARENT_SHADOWS__
//#define __PASSES__
#endif #endif
#ifdef __KERNEL_OPENCL_INTEL_CPU__ #ifdef __KERNEL_OPENCL_INTEL_CPU__