diff --git a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp index e45a4ef514..46e95682dc 100644 --- a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp @@ -1162,7 +1162,7 @@ HSAILKernel::loadArguments( #if defined(WITH_LIGHTNING_COMPILER) //!!!!!FIXME_lmoriche: fix the hidden args - size_t zero; + size_t zero = 0; WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp index 4ba6b781dd..a776d08dd0 100644 --- a/projects/clr/rocclr/runtime/utils/flags.hpp +++ b/projects/clr/rocclr/runtime/utils/flags.hpp @@ -163,7 +163,7 @@ release(bool, GPU_IFH_MODE, false, \ "1 = Enable GPU IFH (infinitely fast hardware) mode. Any other value keeps setting disabled.") \ release(bool, GPU_MIPMAP, true, \ "Enables GPU mipmap extension") \ -release(uint, GPU_ENABLE_PAL, 2, \ +release(uint, GPU_ENABLE_PAL, IF(IS_LIGHTNING,1,2), \ "Enables PAL backend. 0 - GSL(default), 1 - PAL, 2 - GSL and PAL") \ release(bool, DISABLE_DEFERRED_ALLOC, false, \ "Disables deferred memory allocation on device") \ diff --git a/projects/clr/rocclr/runtime/utils/macros.hpp b/projects/clr/rocclr/runtime/utils/macros.hpp index d3cb6a2b60..7ea54b6d05 100644 --- a/projects/clr/rocclr/runtime/utils/macros.hpp +++ b/projects/clr/rocclr/runtime/utils/macros.hpp @@ -98,6 +98,13 @@ # define NOT_WIN64(x) x #endif /*!_WIN64*/ +#ifdef WITH_LIGHTNING_COMPILER +# define LIGHTNING_ONLY(x) x +# define IS_LIGHTNING true +#else /* !WITH_LIGHTNING_COMPILER */ +# define LIGHTNING_ONLY(x) +#endif /* !WITH_LIGHTNING_COMPILER */ + #ifndef IS_LINUX # define IS_LINUX false #endif @@ -107,6 +114,9 @@ #ifndef IS_WINDOWS # define IS_WINDOWS false #endif +#ifndef IS_LIGHTNING +# define IS_LIGHTNING false +#endif #define IF_LEFT_true(x) x #define IF_LEFT_false(x)