Skip to content

Commit 68e6c24

Browse files
committed
opencl: Make Beignet to work by default
Beignet performs self-test and fails for Haswell and kernel 4.0-. These environment variables override the self-test. Set the variables by default: export OCL_IGNORE_SELF_TEST=1 export OCL_STRICT_CONFORMANCE=0
1 parent 045e12b commit 68e6c24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/opencl_depth_packet_processor.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
#define REG_OPENCL_FILE ""
5454
#endif
5555

56+
#include <cstdlib>
57+
5658
namespace libfreenect2
5759
{
5860

@@ -141,6 +143,11 @@ class OpenCLDepthPacketProcessorImpl: public WithPerfLogging
141143
, programBuilt(false)
142144
, programInitialized(false)
143145
{
146+
#if _BSD_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
147+
setenv("OCL_IGNORE_SELF_TEST", "1", 0);
148+
setenv("OCL_STRICT_CONFORMANCE", "0", 0);
149+
#endif
150+
144151
newIrFrame();
145152
newDepthFrame();
146153

0 commit comments

Comments
 (0)