diff --git a/src/backend/opencl/wrappers/OclDevice.cpp b/src/backend/opencl/wrappers/OclDevice.cpp index ff18a788f..54557cbe2 100644 --- a/src/backend/opencl/wrappers/OclDevice.cpp +++ b/src/backend/opencl/wrappers/OclDevice.cpp @@ -38,21 +38,6 @@ typedef union struct { cl_uint type; cl_uint data[5]; } raw; struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie; } topology_amd; -#ifndef CL_DEVICE_TOPOLOGY_AMD -#define CL_DEVICE_TOPOLOGY_AMD 0x4037 -#endif -#ifndef CL_DEVICE_BOARD_NAME_AMD -#define CL_DEVICE_BOARD_NAME_AMD 0x4038 -#endif -#ifndef CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD -#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1 -#endif -#ifndef CL_DEVICE_PCI_BUS_ID_NV -#define CL_DEVICE_PCI_BUS_ID_NV 0x4008 -#endif -#ifndef CL_DEVICE_PCI_SLOT_ID_NV -#define CL_DEVICE_PCI_SLOT_ID_NV 0x4009 -#endif namespace xmrig { diff --git a/src/backend/opencl/wrappers/OclLib.cpp b/src/backend/opencl/wrappers/OclLib.cpp index 0b7160988..6462817e2 100644 --- a/src/backend/opencl/wrappers/OclLib.cpp +++ b/src/backend/opencl/wrappers/OclLib.cpp @@ -403,7 +403,7 @@ cl_int xmrig::OclLib::getDeviceInfo(cl_device_id device, cl_device_info param_na assert(pGetDeviceInfo != nullptr); const cl_int ret = pGetDeviceInfo(device, param_name, param_value_size, param_value, param_value_size_ret); - if (ret != CL_SUCCESS && param_name != 0x4038) { + if (ret != CL_SUCCESS && param_name != CL_DEVICE_BOARD_NAME_AMD) { LOG_ERR("Error %s when calling %s, param 0x%04x", OclError::toString(ret), kGetDeviceInfo, param_name); } diff --git a/src/backend/opencl/wrappers/OclLib.h b/src/backend/opencl/wrappers/OclLib.h index c2f4194e1..61a664686 100644 --- a/src/backend/opencl/wrappers/OclLib.h +++ b/src/backend/opencl/wrappers/OclLib.h @@ -26,6 +26,22 @@ #include "3rdparty/cl.h" #include "base/tools/String.h" +#ifndef CL_DEVICE_TOPOLOGY_AMD +#define CL_DEVICE_TOPOLOGY_AMD 0x4037 +#endif +#ifndef CL_DEVICE_BOARD_NAME_AMD +#define CL_DEVICE_BOARD_NAME_AMD 0x4038 +#endif +#ifndef CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD +#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1 +#endif +#ifndef CL_DEVICE_PCI_BUS_ID_NV +#define CL_DEVICE_PCI_BUS_ID_NV 0x4008 +#endif +#ifndef CL_DEVICE_PCI_SLOT_ID_NV +#define CL_DEVICE_PCI_SLOT_ID_NV 0x4009 +#endif + namespace xmrig {