From eef11174c86c6bbe6e86cd8993480c79c3aacf37 Mon Sep 17 00:00:00 2001 From: "Mi, Yanfeng" Date: Tue, 16 Dec 2025 11:00:08 +0800 Subject: [PATCH] fix: Android OpenCL-CTS get_buffer_info failed issue non-pool sub-buffers should return their parent, while buffers directly from the pool should return nullptr Signed-off-by: Mi, Yanfeng --- opencl/source/mem_obj/mem_obj.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencl/source/mem_obj/mem_obj.cpp b/opencl/source/mem_obj/mem_obj.cpp index 8184b91fabb44..cae06fbe3ece8 100644 --- a/opencl/source/mem_obj/mem_obj.cpp +++ b/opencl/source/mem_obj/mem_obj.cpp @@ -176,7 +176,7 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName, case CL_MEM_OFFSET: clOffset = this->getOffset(); if (nullptr != this->associatedMemObject) { - if (this->getContext()->isPoolBuffer(this->associatedMemObject)) { + if (this->getContext()->isPoolBuffer(this)) { clOffset = 0; } else { clOffset -= this->associatedMemObject->getOffset(); @@ -187,7 +187,7 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName, break; case CL_MEM_ASSOCIATED_MEMOBJECT: - if (this->getContext()->isPoolBuffer(this->associatedMemObject)) { + if (this->getContext()->isPoolBuffer(this)) { clAssociatedMemObject = nullptr; } srcParamSize = sizeof(clAssociatedMemObject);