diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-07 18:48:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-07 18:48:04 +0400 |
commit | 7b0a46b1ff4409a599751392329341c161c7e3c0 (patch) | |
tree | b0c435db7c95235d1adf8ba4eee29faa59f590e6 /intern | |
parent | 2dd33289876cfaf2d25be58fa2f63541616da339 (diff) |
Fix CUDA/OpenCL compile errors in scattering commit.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_path_state.h | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index 8d458c552ac..24b54cd9d9e 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -127,9 +127,11 @@ ccl_device int bsdf_sample(KernelGlobals *kg, const ShaderData *sd, const Shader eval, omega_in, &domega_in->dx, &domega_in->dy, pdf); break; #endif +#ifdef __VOLUME__ case CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID: label = volume_henyey_greenstein_sample(sc, sd->I, sd->dI.dx, sd->dI.dy, randu, randv, eval, omega_in, &domega_in->dx, &domega_in->dy, pdf); break; +#endif default: label = LABEL_NONE; break; diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index 5def19f2c42..d9af6298813 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -153,8 +153,10 @@ ccl_device_inline float path_state_terminate_probability(KernelGlobals *kg, Path if((state->bounce >= kernel_data.integrator.max_bounce) || (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) || (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) || - (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce) || - (state->volume_bounce >= kernel_data.integrator.max_volume_bounce)) +#ifdef __VOLUME__ + (state->volume_bounce >= kernel_data.integrator.max_volume_bounce) || +#endif + (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce)) { return 0.0f; } diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index 35844dc4f65..b113e906e9d 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -1060,8 +1060,6 @@ ccl_device int shader_phase_sample_closure(KernelGlobals *kg, const ShaderData * return label; } -#endif - /* Volume Evaluation */ ccl_device void shader_eval_volume(KernelGlobals *kg, ShaderData *sd, @@ -1114,6 +1112,8 @@ ccl_device void shader_eval_volume(KernelGlobals *kg, ShaderData *sd, } } +#endif + /* Displacement Evaluation */ ccl_device void shader_eval_displacement(KernelGlobals *kg, ShaderData *sd, ShaderContext ctx) diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index 70ac1d3d37c..42e66a79978 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -481,6 +481,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * ccl_device void svm_node_closure_volume(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node, int path_flag) { +#ifdef __VOLUME__ uint type, param1_offset, param2_offset; #ifdef __MULTI_CLOSURE__ @@ -521,6 +522,7 @@ ccl_device void svm_node_closure_volume(KernelGlobals *kg, ShaderData *sd, float default: break; } +#endif } ccl_device void svm_node_closure_emission(ShaderData *sd, float *stack, uint4 node) |