Remove OCL object from MemoryProperties 9/n

Refactor:
- validateMemoryPropertiesForBuffer

Related-To: NEO-3132
Change-Id: Ibdeec8ecdd2025718a3379b333a6c8ef9a8ceabf
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2019-08-28 10:38:29 +02:00
committed by sys_ocldev
parent 64e810fb0f
commit 0753dc211d
6 changed files with 38 additions and 20 deletions

View File

@@ -593,7 +593,7 @@ cl_mem CL_API_CALL clCreateBuffer(cl_context context,
propertiesStruct.flags = flags;
if (isFieldValid(propertiesStruct.flags, MemObjHelper::validFlagsForBuffer)) {
Buffer::validateInputAndCreateBuffer(context, propertiesStruct, size, hostPtr, retVal, buffer);
Buffer::validateInputAndCreateBuffer(context, propertiesStruct, flags, 0, size, hostPtr, retVal, buffer);
} else {
retVal = CL_INVALID_VALUE;
}
@@ -622,7 +622,7 @@ cl_mem CL_API_CALL clCreateBufferWithPropertiesINTEL(cl_context context,
MemoryProperties propertiesStruct;
if (MemoryPropertiesParser::parseMemoryProperties(properties, propertiesStruct, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::BUFFER)) {
Buffer::validateInputAndCreateBuffer(context, propertiesStruct, size, hostPtr, retVal, buffer);
Buffer::validateInputAndCreateBuffer(context, propertiesStruct, propertiesStruct.flags, propertiesStruct.flags_intel, size, hostPtr, retVal, buffer);
} else {
retVal = CL_INVALID_VALUE;
}