forked from bartvdbraak/blender
Fix Cycles device kernels containing debug assertation code
NanoVDB includes "assert.h" and makes use of "assert" in several places and since the compile pipeline for CUDA/OptiX kernels does not define "NDEBUG" for release builds, those debug checks were always added. This is not intended, so this patch disables "assert" for CUDA/OptiX by defining "NDEBUG" before including NanoVDB headers. This also fixes a warning about unknown pragmas in NanoVDB thrown by the CUDA compiler.
This commit is contained in:
parent
5d13082622
commit
a3c4091215
@ -18,6 +18,7 @@
|
||||
#define __KERNEL_CPU_IMAGE_H__
|
||||
|
||||
#ifdef WITH_NANOVDB
|
||||
# define NANOVDB_USE_INTRINSICS
|
||||
# include <nanovdb/NanoVDB.h>
|
||||
# include <nanovdb/util/SampleFromVoxels.h>
|
||||
#endif
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
#ifdef WITH_NANOVDB
|
||||
# define NDEBUG /* Disable "assert" in device code */
|
||||
# define NANOVDB_USE_INTRINSICS
|
||||
# include "nanovdb/NanoVDB.h"
|
||||
# include "nanovdb/util/SampleFromVoxels.h"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user