From f7ab122fe1bccf2b910f48bb18628efc6c78870c Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Wed, 25 Mar 2020 11:06:08 -0700 Subject: [PATCH] Change for OpenCL2.2 header promotion Change-Id: Icd579e5c94af6e8d984a3f6c2606be44dec72e91 --- CMakeLists.txt | 2 +- include/vdi_common.hpp | 2 +- platform/object.hpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 413666c7c..ee7ba1fab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ find_package(Threads REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") -add_definitions(-DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=1 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER) +add_definitions(-DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=1 -DCL_TARGET_OPENCL_VERSION=220 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER) add_definitions(-DOPENCL_C_MAJOR=2 -DOPENCL_C_MINOR=0) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic -Wl,--unresolved-symbols=report-all") diff --git a/include/vdi_common.hpp b/include/vdi_common.hpp index 10f927c9f..feb73288e 100644 --- a/include/vdi_common.hpp +++ b/include/vdi_common.hpp @@ -149,7 +149,7 @@ struct ParamInfo } // namespace detail -struct PlatformIDS { const struct KHRicdVendorDispatchRec* dispatch_; }; +struct PlatformIDS { const cl_icd_dispatch* dispatch_; }; class PlatformID { public: static PlatformIDS Platform; diff --git a/platform/object.hpp b/platform/object.hpp index 4619c12f8..db1beecfc 100644 --- a/platform/object.hpp +++ b/platform/object.hpp @@ -61,11 +61,11 @@ CL_TYPES_DO(DECLARE_CL_TYPES); #undef DECLARE_CL_TYPES -struct KHRicdVendorDispatchRec; +typedef struct _cl_icd_dispatch cl_icd_dispatch; #define DECLARE_CL_TYPES(CL, AMD) \ typedef struct _##CL { \ - struct KHRicdVendorDispatchRec* dispatch; \ + cl_icd_dispatch* dispatch; \ } * CL; AMD_CL_TYPES_DO(DECLARE_CL_TYPES); @@ -108,8 +108,8 @@ CL_TYPES_DO(DEFINE_CL_TRAITS); //! \endcond struct ICDDispatchedObject { - static struct KHRicdVendorDispatchRec icdVendorDispatch_[]; - const struct KHRicdVendorDispatchRec* const dispatch_; + static cl_icd_dispatch icdVendorDispatch_[]; + const cl_icd_dispatch* const dispatch_; protected: ICDDispatchedObject() : dispatch_(icdVendorDispatch_) {}