mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Pass Device when creating MemoryProperties
Related-To: NEO-4651 Change-Id: Ie1f7f55d4817612de83bfb2a372fd7ac35c11930 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
7f5aa241b2
commit
78d07b9b37
@@ -1131,7 +1131,7 @@ cl_int CL_API_CALL clGetImageParamsINTEL(cl_context context,
|
||||
"imageDesc", imageDesc,
|
||||
"imageRowPitch", imageRowPitch,
|
||||
"imageSlicePitch", imageSlicePitch);
|
||||
ClSurfaceFormatInfo *surfaceFormat = nullptr;
|
||||
const ClSurfaceFormatInfo *surfaceFormat = nullptr;
|
||||
cl_mem_flags memFlags = CL_MEM_READ_ONLY;
|
||||
retVal = validateObjects(context);
|
||||
auto pContext = castToObject<Context>(context);
|
||||
@@ -1145,8 +1145,11 @@ cl_int CL_API_CALL clGetImageParamsINTEL(cl_context context,
|
||||
retVal = Image::validateImageFormat(imageFormat);
|
||||
}
|
||||
if (CL_SUCCESS == retVal) {
|
||||
surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(memFlags, imageFormat, pContext->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(pContext, MemoryPropertiesHelper::createMemoryProperties(memFlags, 0, 0), surfaceFormat, imageDesc, nullptr);
|
||||
auto pClDevice = pContext->getDevice(0);
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(memFlags, imageFormat,
|
||||
pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(pContext, MemoryPropertiesHelper::createMemoryProperties(memFlags, 0, 0, &pClDevice->getDevice()),
|
||||
surfaceFormat, imageDesc, nullptr);
|
||||
}
|
||||
if (CL_SUCCESS == retVal) {
|
||||
retVal = Image::getImageParams(pContext, memFlags, surfaceFormat, imageDesc, imageRowPitch, imageSlicePitch);
|
||||
|
||||
Reference in New Issue
Block a user