Workaround for AMD GPU OpenCL compiler.
This commit is contained in:
@@ -399,6 +399,12 @@ ccl_device_noinline void subsurface_scatter_multi_setup(
|
|||||||
#else
|
#else
|
||||||
Ray *ray = &ss_isect->ray;
|
Ray *ray = &ss_isect->ray;
|
||||||
#endif
|
#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. */
|
/* Setup new shading point. */
|
||||||
shader_setup_from_subsurface(kg, sd, &ss_isect->hits[hit], ray);
|
shader_setup_from_subsurface(kg, sd, &ss_isect->hits[hit], ray);
|
||||||
|
|
||||||
|
@@ -43,6 +43,9 @@ typedef struct SplitParams {
|
|||||||
ccl_global char *use_queues_flag;
|
ccl_global char *use_queues_flag;
|
||||||
|
|
||||||
ccl_global float *buffer;
|
ccl_global float *buffer;
|
||||||
|
|
||||||
|
/* Place for storing sd->flag. AMD GPU OpenCL compiler workaround */
|
||||||
|
int dummy_sd_flag;
|
||||||
} SplitParams;
|
} SplitParams;
|
||||||
|
|
||||||
/* Global memory variables [porting]; These memory is used for
|
/* Global memory variables [porting]; These memory is used for
|
||||||
|
Reference in New Issue
Block a user