mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Do not validate platform for add comment call.
Change-Id: I1f4c28541aea8e13ac1a63511acb5528b3047fe5 Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
0283f7ad13
commit
a21f921dcf
@@ -4238,20 +4238,16 @@ cl_int CL_API_CALL clAddCommentINTEL(cl_platform_id platform, const char *commen
|
||||
API_ENTER(&retVal);
|
||||
DBG_LOG_INPUTS("platform", platform, "comment", comment);
|
||||
|
||||
Platform *pPlatform = nullptr;
|
||||
retVal = validateObjects(WithCastToInternal(platform, &pPlatform));
|
||||
auto executionEnvironment = ::platform()->peekExecutionEnvironment();
|
||||
auto aubCenter = executionEnvironment->aubCenter.get();
|
||||
|
||||
if (retVal == CL_SUCCESS) {
|
||||
auto executionEnvironment = pPlatform->peekExecutionEnvironment();
|
||||
auto aubCenter = executionEnvironment->aubCenter.get();
|
||||
|
||||
if (!comment || (aubCenter && !aubCenter->getAubManager())) {
|
||||
retVal = CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
if (retVal == CL_SUCCESS && aubCenter) {
|
||||
aubCenter->getAubManager()->addComment(comment);
|
||||
}
|
||||
if (!comment || (aubCenter && !aubCenter->getAubManager())) {
|
||||
retVal = CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
if (retVal == CL_SUCCESS && aubCenter) {
|
||||
aubCenter->getAubManager()->addComment(comment);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user