diff options
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/device/cpu/kernel_arch.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/device/cpu/kernel_arch_impl.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/device/gpu/kernel.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/integrator/integrator_intersect_shadow.h | 3 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_bake.h | 12 |
5 files changed, 16 insertions, 11 deletions
diff --git a/intern/cycles/kernel/device/cpu/kernel_arch.h b/intern/cycles/kernel/device/cpu/kernel_arch.h index 81f328c710b..8b7b0ec0548 100644 --- a/intern/cycles/kernel/device/cpu/kernel_arch.h +++ b/intern/cycles/kernel/device/cpu/kernel_arch.h @@ -58,11 +58,11 @@ KERNEL_INTEGRATOR_SHADE_FUNCTION(megakernel); void KERNEL_FUNCTION_FULL_NAME(shader_eval_background)(const KernelGlobals *kg, const KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset); void KERNEL_FUNCTION_FULL_NAME(shader_eval_displace)(const KernelGlobals *kg, const KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset); /* -------------------------------------------------------------------- diff --git a/intern/cycles/kernel/device/cpu/kernel_arch_impl.h b/intern/cycles/kernel/device/cpu/kernel_arch_impl.h index 1432abfd330..23e371f165f 100644 --- a/intern/cycles/kernel/device/cpu/kernel_arch_impl.h +++ b/intern/cycles/kernel/device/cpu/kernel_arch_impl.h @@ -114,7 +114,7 @@ DEFINE_INTEGRATOR_SHADE_KERNEL(megakernel) void KERNEL_FUNCTION_FULL_NAME(shader_eval_displace)(const KernelGlobals *kg, const KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset) { #ifdef KERNEL_STUB @@ -126,7 +126,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader_eval_displace)(const KernelGlobals *kg, void KERNEL_FUNCTION_FULL_NAME(shader_eval_background)(const KernelGlobals *kg, const KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset) { #ifdef KERNEL_STUB diff --git a/intern/cycles/kernel/device/gpu/kernel.h b/intern/cycles/kernel/device/gpu/kernel.h index 3379114fc62..21901215757 100644 --- a/intern/cycles/kernel/device/gpu/kernel.h +++ b/intern/cycles/kernel/device/gpu/kernel.h @@ -615,7 +615,7 @@ KERNEL_FILM_CONVERT_DEFINE(float4, rgba) ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) kernel_gpu_shader_eval_displace(KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset, const int work_size) { @@ -629,7 +629,7 @@ ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) kernel_gpu_shader_eval_background(KernelShaderEvalInput *input, - float4 *output, + float *output, const int offset, const int work_size) { diff --git a/intern/cycles/kernel/integrator/integrator_intersect_shadow.h b/intern/cycles/kernel/integrator/integrator_intersect_shadow.h index 00d44f0e5ed..3ebd21e4651 100644 --- a/intern/cycles/kernel/integrator/integrator_intersect_shadow.h +++ b/intern/cycles/kernel/integrator/integrator_intersect_shadow.h @@ -85,7 +85,8 @@ ccl_device bool integrate_intersect_shadow_transparent(INTEGRATOR_STATE_ARGS, if (num_recorded_hits > 0) { sort_intersections(isect, num_recorded_hits); - /* Write intersection result into global integrator state memory. */ + /* Write intersection result into global integrator state memory. + * More efficient may be to do this directly from the intersection kernel. */ for (int hit = 0; hit < num_recorded_hits; hit++) { integrator_state_write_shadow_isect(INTEGRATOR_STATE_PASS, &isect[hit], hit); } diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index cfff727d007..6cbb8dcc291 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -26,7 +26,7 @@ CCL_NAMESPACE_BEGIN ccl_device void kernel_displace_evaluate(ccl_global const KernelGlobals *kg, ccl_global const KernelShaderEvalInput *input, - ccl_global float4 *output, + ccl_global float *output, const int offset) { /* Setup shader data. */ @@ -53,12 +53,14 @@ ccl_device void kernel_displace_evaluate(ccl_global const KernelGlobals *kg, D = ensure_finite3(D); /* Write output. */ - output[offset] += make_float4(D.x, D.y, D.z, 0.0f); + output[offset * 3 + 0] += D.x; + output[offset * 3 + 1] += D.y; + output[offset * 3 + 2] += D.z; } ccl_device void kernel_background_evaluate(ccl_global const KernelGlobals *kg, ccl_global const KernelShaderEvalInput *input, - ccl_global float4 *output, + ccl_global float *output, const int offset) { /* Setup ray */ @@ -88,7 +90,9 @@ ccl_device void kernel_background_evaluate(ccl_global const KernelGlobals *kg, color = ensure_finite3(color); /* Write output. */ - output[offset] += make_float4(color.x, color.y, color.z, 0.0f); + output[offset * 3 + 0] += color.x; + output[offset * 3 + 1] += color.y; + output[offset * 3 + 2] += color.z; } CCL_NAMESPACE_END |