Cycles: Remove Compilation Warning

ROCm 3.9 already defined `NULL`. This patch will first check if it was
already defined to remove compilation warnings.

NOTE: This doesn't add official support for ROCm as it still fails to
render correctly (crashes with default cube).

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D9610
This commit is contained in:
Jeroen Bakker 2020-11-23 16:36:00 +01:00 committed by Jeroen Bakker
parent 1f09dcc121
commit 8351760ed0
1 changed files with 3 additions and 1 deletions

View File

@ -162,7 +162,9 @@
#define kernel_tex_fetch(tex, index) kernel_tex_array(tex)[(index)]
/* define NULL */
#define NULL 0
#ifndef NULL
# define NULL ((void *)0)
#endif
/* enable extensions */
#ifdef __KERNEL_CL_KHR_FP16__