Add use of device from context instead of platform in clCreatePipe

Change-Id: I2c42275183b7f5a096240905e7e14d39afcf9104
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2020-01-14 11:48:33 +01:00
committed by sys_ocldev
parent 98408e120e
commit 236ac104bb
2 changed files with 28 additions and 3 deletions

View File

@@ -4506,8 +4506,6 @@ cl_mem CL_API_CALL clCreatePipe(cl_context context,
"const cl_pipe_properties", properties,
"cl_int", errcodeRet);
auto pPlatform = platform();
auto pDevice = pPlatform->getDevice(0);
Context *pContext = nullptr;
const cl_mem_flags allValidFlags =
@@ -4534,6 +4532,7 @@ cl_mem CL_API_CALL clCreatePipe(cl_context context,
if (retVal != CL_SUCCESS) {
break;
}
auto pDevice = pContext->getDevice(0);
if (pipePacketSize > pDevice->getDeviceInfo().pipeMaxPacketSize) {
retVal = CL_INVALID_PIPE_SIZE;