mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Adjust definitions and replace literal 0x4038
This commit is contained in:
parent
eb54cc0e0f
commit
d735caa334
3 changed files with 17 additions and 16 deletions
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Reference in a new issue