Skip to content

Commit d504ca7

Browse files
committed
Fix embed kernels option on OSX
1 parent 2828e20 commit d504ca7

File tree

8 files changed

+34
-12
lines changed

8 files changed

+34
-12
lines changed

CLW/CLWParallelPrimitives.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ THE SOFTWARE.
3030

3131
#ifdef RR_EMBED_KERNELS
3232
#if USE_OPENCL
33-
# include <CLW/kernelcache/clwkernels_cl.h>
33+
#include "CLW/kernelcache/clwkernels_cl.h"
3434
#endif
3535
#endif // RR_EMBED_KERNELS
3636

@@ -952,4 +952,4 @@ CLWEvent CLWParallelPrimitives::Copy(unsigned int deviceIdx, CLWBuffer<cl_int> i
952952
copyKernel.SetArg(2, output);
953953

954954
return context_.Launch1D(0, NUM_BLOCKS * WG_SIZE, WG_SIZE, copyKernel);
955-
}
955+
}

Calc/src/device_clw.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,6 @@ namespace Calc
459459
""
460460
#endif
461461
);
462-
#ifdef USE_SAFE_MATH
463-
buildopts.append("-D USE_SAFE_MATH");
464-
#endif
465462

466463
return new ExecutableClw(
467464
CLWProgram::CreateFromFile(filename, headernames, numheaders, buildopts.c_str(), m_context)

RadeonRays/RadeonRays.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ project "RadeonRays"
108108
end
109109

110110
if _OPTIONS["enable_raymask"] then
111-
configuration {}
112-
defines {"RR_RAY_MASK"}
111+
configuration {}
112+
defines {"RR_RAY_MASK"}
113+
end
114+
115+
if _OPTIONS["safe_math"] then
116+
configuration {}
117+
defines { "USE_SAFE_MATH" }
113118
end
114119

115120
if _OPTIONS["use_vulkan"] then

RadeonRays/src/intersector/intersector_2level.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,14 @@ namespace RadeonRays
130130
{
131131
std::string buildopts =
132132
#ifdef RR_RAY_MASK
133-
"-D RR_RAY_MASK";
133+
"-D RR_RAY_MASK ";
134134
#else
135135
"";
136136
#endif
137+
138+
#ifdef USE_SAFE_MATH
139+
buildopts.append("-D USE_SAFE_MATH ");
140+
#endif
137141

138142
#ifndef RR_EMBED_KERNELS
139143
if ( device->GetPlatform() == Calc::Platform::kOpenCL )

RadeonRays/src/intersector/intersector_bittrail.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,14 @@ namespace RadeonRays
9090
{
9191
std::string buildopts =
9292
#ifdef RR_RAY_MASK
93-
"-D RR_RAY_MASK";
93+
"-D RR_RAY_MASK ";
9494
#else
9595
"";
9696
#endif
97+
98+
#ifdef USE_SAFE_MATH
99+
buildopts.append("-D USE_SAFE_MATH ");
100+
#endif
97101

98102
#ifndef RR_EMBED_KERNELS
99103
if (device->GetPlatform() == Calc::Platform::kOpenCL)

RadeonRays/src/intersector/intersector_hlbvh.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@ namespace RadeonRays
7979
{
8080
std::string buildopts =
8181
#ifdef RR_RAY_MASK
82-
"-D RR_RAY_MASK";
82+
"-D RR_RAY_MASK ";
8383
#else
8484
"";
8585
#endif
86+
87+
#ifdef USE_SAFE_MATH
88+
buildopts.append("-D USE_SAFE_MATH ");
89+
#endif
8690

8791
#ifndef RR_EMBED_KERNELS
8892
if ( device->GetPlatform() == Calc::Platform::kOpenCL )

RadeonRays/src/intersector/intersector_short_stack.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ namespace RadeonRays
8585
{
8686
std::string buildopts =
8787
#ifdef RR_RAY_MASK
88-
"-D RR_RAY_MASK";
88+
"-D RR_RAY_MASK ";
8989
#else
9090
"";
9191
#endif
92+
93+
#ifdef USE_SAFE_MATH
94+
buildopts.append("-D USE_SAFE_MATH ");
95+
#endif
9296

9397
#ifndef RR_EMBED_KERNELS
9498
if (device->GetPlatform() == Calc::Platform::kOpenCL)

RadeonRays/src/intersector/intersector_skip_links.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,15 @@ namespace RadeonRays
8383
{
8484
std::string buildopts =
8585
#ifdef RR_RAY_MASK
86-
"-D RR_RAY_MASK";
86+
"-D RR_RAY_MASK ";
8787
#else
8888
"";
8989
#endif
9090

91+
#ifdef USE_SAFE_MATH
92+
buildopts.append("-D USE_SAFE_MATH ");
93+
#endif
94+
9195
#ifndef RR_EMBED_KERNELS
9296
if ( device->GetPlatform() == Calc::Platform::kOpenCL )
9397
{

0 commit comments

Comments
 (0)