Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-10-29 19:44:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-10-29 19:52:56 +0300
commit4ca688a963408fe326ba8e2a696d7b0fdc4eb1e4 (patch)
treeeeffd8dbbb5bf80dd98220cc3d501749c030c6e6 /intern/cycles/kernel/split/kernel_next_iteration_setup.h
parentfc5f717888f11caaa9cd246e2131a3892c81fbd1 (diff)
Cycles: OpenCL split kernel cleanup, move casts from .h files to .cl files
Ideally we shouldn't use char* at all, but for now we have to, so at least let's assume common .h files are free from pointer magic.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_next_iteration_setup.h')
-rw-r--r--intern/cycles/kernel/split/kernel_next_iteration_setup.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/intern/cycles/kernel/split/kernel_next_iteration_setup.h b/intern/cycles/kernel/split/kernel_next_iteration_setup.h
index e1a1577d7ae..fa8793203d1 100644
--- a/intern/cycles/kernel/split/kernel_next_iteration_setup.h
+++ b/intern/cycles/kernel/split/kernel_next_iteration_setup.h
@@ -30,7 +30,7 @@
* throughput_coop --------------------------------------| |--- Queue_data (QUEUE_HITBF_BUFF_UPDATE_TOREGEN_RAYS)
* PathRadiance_coop ------------------------------------| |--- throughput_coop
* PathState_coop ---------------------------------------| |--- PathRadiance_coop
- * shader_data ------------------------------------------| |--- PathState_coop
+ * sd ---------------------------------------------------| |--- PathState_coop
* ray_state --------------------------------------------| |--- ray_state
* Queue_data (QUEUE_ACTIVE_AND_REGENERATD_RAYS) --------| |--- Ray_coop
* Queue_index (QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS) ---| |--- use_queues_flag
@@ -60,9 +60,9 @@
* QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will be filled with RAY_TO_REGENERATE and more RAY_UPDATE_BUFFER rays
*/
ccl_device char kernel_next_iteration_setup(
- ccl_global char *globals,
+ KernelGlobals *kg,
ccl_constant KernelData *data,
- ccl_global char *shader_data, /* Required for setting up ray for next iteration */
+ ShaderData *sd, /* Required for setting up ray for next iteration */
ccl_global uint *rng_coop, /* Required for setting up ray for next iteration */
ccl_global float3 *throughput_coop, /* Required for setting up ray for next iteration */
PathRadiance *PathRadiance_coop, /* Required for setting up ray for next iteration */
@@ -81,11 +81,9 @@ ccl_device char kernel_next_iteration_setup(
{
char enqueue_flag = 0;
- /* Load kernel globals structure and ShaderData structure. */
- KernelGlobals *kg = (KernelGlobals *)globals;
- ShaderData *sd = (ShaderData *)shader_data;
- PathRadiance *L = 0x0;
- ccl_global PathState *state = 0x0;
+ /* Load ShaderData structure. */
+ PathRadiance *L = NULL;
+ ccl_global PathState *state = NULL;
/* Path radiance update for AO/Direct_lighting's shadow blocked. */
if(IS_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_DL) ||