mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-02 03:06:30 +00:00
Possibly fix problem with clGetProgramInfo crash
This commit is contained in:
parent
67e29c1af1
commit
5ec5b5ed00
1 changed files with 12 additions and 2 deletions
|
@ -30,8 +30,6 @@
|
||||||
|
|
||||||
#if defined(OCL_DEBUG_REFERENCE_COUNT)
|
#if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
# define LOG_REFS(x, ...) xmrig::Log::print(xmrig::Log::WARNING, x, ##__VA_ARGS__)
|
# define LOG_REFS(x, ...) xmrig::Log::print(xmrig::Log::WARNING, x, ##__VA_ARGS__)
|
||||||
#else
|
|
||||||
# define LOG_REFS(x, ...)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -476,7 +474,9 @@ cl_int xmrig::OclLib::release(cl_command_queue command_queue) noexcept
|
||||||
return CL_SUCCESS;
|
return CL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~queue", command_queue, getUint(command_queue, CL_QUEUE_REFERENCE_COUNT));
|
LOG_REFS("%p %u ~queue", command_queue, getUint(command_queue, CL_QUEUE_REFERENCE_COUNT));
|
||||||
|
# endif
|
||||||
|
|
||||||
finish(command_queue);
|
finish(command_queue);
|
||||||
|
|
||||||
|
@ -493,7 +493,9 @@ cl_int xmrig::OclLib::release(cl_context context) noexcept
|
||||||
{
|
{
|
||||||
assert(pReleaseContext != nullptr);
|
assert(pReleaseContext != nullptr);
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~context", context, getUint(context, CL_CONTEXT_REFERENCE_COUNT));
|
LOG_REFS("%p %u ~context", context, getUint(context, CL_CONTEXT_REFERENCE_COUNT));
|
||||||
|
# endif
|
||||||
|
|
||||||
const cl_int ret = pReleaseContext(context);
|
const cl_int ret = pReleaseContext(context);
|
||||||
if (ret != CL_SUCCESS) {
|
if (ret != CL_SUCCESS) {
|
||||||
|
@ -508,7 +510,9 @@ cl_int xmrig::OclLib::release(cl_device_id id) noexcept
|
||||||
{
|
{
|
||||||
assert(pReleaseDevice != nullptr);
|
assert(pReleaseDevice != nullptr);
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~device", id, getUint(id, CL_DEVICE_REFERENCE_COUNT));
|
LOG_REFS("%p %u ~device", id, getUint(id, CL_DEVICE_REFERENCE_COUNT));
|
||||||
|
# endif
|
||||||
|
|
||||||
const cl_int ret = pReleaseDevice(id);
|
const cl_int ret = pReleaseDevice(id);
|
||||||
if (ret != CL_SUCCESS) {
|
if (ret != CL_SUCCESS) {
|
||||||
|
@ -527,7 +531,9 @@ cl_int xmrig::OclLib::release(cl_kernel kernel) noexcept
|
||||||
return CL_SUCCESS;
|
return CL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~kernel %s", kernel, getUint(kernel, CL_KERNEL_REFERENCE_COUNT), getString(kernel, CL_KERNEL_FUNCTION_NAME).data());
|
LOG_REFS("%p %u ~kernel %s", kernel, getUint(kernel, CL_KERNEL_REFERENCE_COUNT), getString(kernel, CL_KERNEL_FUNCTION_NAME).data());
|
||||||
|
# endif
|
||||||
|
|
||||||
const cl_int ret = pReleaseKernel(kernel);
|
const cl_int ret = pReleaseKernel(kernel);
|
||||||
if (ret != CL_SUCCESS) {
|
if (ret != CL_SUCCESS) {
|
||||||
|
@ -546,7 +552,9 @@ cl_int xmrig::OclLib::release(cl_mem mem_obj) noexcept
|
||||||
return CL_SUCCESS;
|
return CL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~mem %zub", mem_obj, getUint(mem_obj, CL_MEM_REFERENCE_COUNT), getUlong(mem_obj, CL_MEM_SIZE));
|
LOG_REFS("%p %u ~mem %zub", mem_obj, getUint(mem_obj, CL_MEM_REFERENCE_COUNT), getUlong(mem_obj, CL_MEM_SIZE));
|
||||||
|
# endif
|
||||||
|
|
||||||
const cl_int ret = pReleaseMemObject(mem_obj);
|
const cl_int ret = pReleaseMemObject(mem_obj);
|
||||||
if (ret != CL_SUCCESS) {
|
if (ret != CL_SUCCESS) {
|
||||||
|
@ -565,7 +573,9 @@ cl_int xmrig::OclLib::release(cl_program program) noexcept
|
||||||
return CL_SUCCESS;
|
return CL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if defined(OCL_DEBUG_REFERENCE_COUNT)
|
||||||
LOG_REFS("%p %u ~program %s", program, getUint(program, CL_PROGRAM_REFERENCE_COUNT), getString(program, CL_PROGRAM_KERNEL_NAMES).data());
|
LOG_REFS("%p %u ~program %s", program, getUint(program, CL_PROGRAM_REFERENCE_COUNT), getString(program, CL_PROGRAM_KERNEL_NAMES).data());
|
||||||
|
# endif
|
||||||
|
|
||||||
const cl_int ret = pReleaseProgram(program);
|
const cl_int ret = pReleaseProgram(program);
|
||||||
if (ret != CL_SUCCESS) {
|
if (ret != CL_SUCCESS) {
|
||||||
|
|
Loading…
Reference in a new issue