Workaround for AMD GPU OpenCL compiler.

This commit is contained in:
Hristo Gueorguiev
2017-04-25 20:08:14 +02:00
parent 9dadd5ff93
commit 9d26e32ea2
2 changed files with 9 additions and 0 deletions

View File

@@ -399,6 +399,12 @@ ccl_device_noinline void subsurface_scatter_multi_setup(
#else
Ray *ray = &ss_isect->ray;
#endif
/* Workaround for AMD GPU OpenCL compiler. Most probably cache bypass issue. */
#if defined(__SPLIT_KERNEL__) && defined(__KERNEL_OPENCL_AMD__) && defined(__KERNEL_GPU__)
kernel_split_params.dummy_sd_flag = sd->flag;
#endif
/* Setup new shading point. */
shader_setup_from_subsurface(kg, sd, &ss_isect->hits[hit], ray);

View File

@@ -43,6 +43,9 @@ typedef struct SplitParams {
ccl_global char *use_queues_flag;
ccl_global float *buffer;
/* Place for storing sd->flag. AMD GPU OpenCL compiler workaround */
int dummy_sd_flag;
} SplitParams;
/* Global memory variables [porting]; These memory is used for