@@ -611,7 +611,7 @@ cl_mem CL_API_CALL clCreateBuffer(cl_context context,
611611 cl_mem buffer = nullptr ;
612612 ErrorCodeHelper err (errcodeRet, CL_SUCCESS);
613613
614- MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 );
614+ MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 , 0 );
615615 if (isFieldValid (flags, MemObjHelper::validFlagsForBuffer)) {
616616 Buffer::validateInputAndCreateBuffer (context, memoryProperties, flags, 0 , size, hostPtr, retVal, buffer);
617617 } else {
@@ -643,7 +643,8 @@ cl_mem CL_API_CALL clCreateBufferWithPropertiesINTEL(cl_context context,
643643 MemoryPropertiesFlags memoryProperties;
644644 cl_mem_flags flags = 0 ;
645645 cl_mem_flags_intel flagsIntel = 0 ;
646- if (MemoryPropertiesParser::parseMemoryProperties (properties, memoryProperties, flags, flagsIntel, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::BUFFER)) {
646+ cl_mem_alloc_flags_intel allocflags = 0 ;
647+ if (MemoryPropertiesParser::parseMemoryProperties (properties, memoryProperties, flags, flagsIntel, allocflags, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::BUFFER)) {
647648 Buffer::validateInputAndCreateBuffer (context, memoryProperties, flags, flagsIntel, size, hostPtr, retVal, buffer);
648649 } else {
649650 retVal = CL_INVALID_VALUE;
@@ -786,7 +787,7 @@ cl_mem CL_API_CALL clCreateImage(cl_context context,
786787 retVal = validateObjects (WithCastToInternal (context, &pContext));
787788
788789 if (retVal == CL_SUCCESS) {
789- MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 );
790+ MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 , 0 );
790791 if (isFieldValid (flags, MemObjHelper::validFlagsForImage)) {
791792 image = Image::validateAndCreateImage (pContext, memoryProperties, flags, 0 , imageFormat, imageDesc, hostPtr, retVal);
792793 } else {
@@ -825,10 +826,11 @@ cl_mem CL_API_CALL clCreateImageWithPropertiesINTEL(cl_context context,
825826 MemoryPropertiesFlags memoryProperties;
826827 cl_mem_flags flags = 0 ;
827828 cl_mem_flags_intel flagsIntel = 0 ;
829+ cl_mem_alloc_flags_intel allocflags = 0 ;
828830 retVal = validateObjects (WithCastToInternal (context, &pContext));
829831
830832 if (retVal == CL_SUCCESS) {
831- if (MemoryPropertiesParser::parseMemoryProperties (properties, memoryProperties, flags, flagsIntel, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::IMAGE)) {
833+ if (MemoryPropertiesParser::parseMemoryProperties (properties, memoryProperties, flags, flagsIntel, allocflags, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::IMAGE)) {
832834 image = Image::validateAndCreateImage (pContext, memoryProperties, flags, flagsIntel, imageFormat, imageDesc, hostPtr, retVal);
833835 } else {
834836 retVal = CL_INVALID_VALUE;
@@ -875,7 +877,7 @@ cl_mem CL_API_CALL clCreateImage2D(cl_context context,
875877 retVal = validateObjects (WithCastToInternal (context, &pContext));
876878
877879 if (retVal == CL_SUCCESS) {
878- MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 );
880+ MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 , 0 );
879881 image2D = Image::validateAndCreateImage (pContext, memoryProperties, flags, 0 , imageFormat, &imageDesc, hostPtr, retVal);
880882 }
881883
@@ -926,7 +928,7 @@ cl_mem CL_API_CALL clCreateImage3D(cl_context context,
926928 retVal = validateObjects (WithCastToInternal (context, &pContext));
927929
928930 if (retVal == CL_SUCCESS) {
929- MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 );
931+ MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (flags, 0 , 0 );
930932 image3D = Image::validateAndCreateImage (pContext, memoryProperties, flags, 0 , imageFormat, &imageDesc, hostPtr, retVal);
931933 }
932934
@@ -1088,7 +1090,7 @@ cl_int CL_API_CALL clGetImageParamsINTEL(cl_context context,
10881090 }
10891091 if (CL_SUCCESS == retVal) {
10901092 surfaceFormat = (SurfaceFormatInfo *)Image::getSurfaceFormatFromTable (memFlags, imageFormat);
1091- retVal = Image::validate (pContext, MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (memFlags, 0 ), surfaceFormat, imageDesc, nullptr );
1093+ retVal = Image::validate (pContext, MemoryPropertiesFlagsParser::createMemoryPropertiesFlags (memFlags, 0 , 0 ), surfaceFormat, imageDesc, nullptr );
10921094 }
10931095 if (CL_SUCCESS == retVal) {
10941096 retVal = Image::getImageParams (pContext, memFlags, surfaceFormat, imageDesc, imageRowPitch, imageSlicePitch);
@@ -3445,7 +3447,10 @@ void *clHostMemAllocINTEL(
34453447 }
34463448
34473449 SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties (InternalMemoryType::HOST_UNIFIED_MEMORY);
3448- if (!MemObjHelper::parseUnifiedMemoryProperties (properties, unifiedMemoryProperties)) {
3450+ cl_mem_flags flags = 0 ;
3451+ cl_mem_flags_intel flagsIntel = 0 ;
3452+ cl_mem_alloc_flags_intel allocflags = 0 ;
3453+ if (!MemoryPropertiesParser::parseMemoryProperties (properties, unifiedMemoryProperties.allocationFlags , flags, flagsIntel, allocflags, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::UNKNOWN)) {
34493454 err.set (CL_INVALID_VALUE);
34503455 return nullptr ;
34513456 }
@@ -3478,7 +3483,10 @@ void *clDeviceMemAllocINTEL(
34783483 }
34793484
34803485 SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties (InternalMemoryType::DEVICE_UNIFIED_MEMORY);
3481- if (!MemObjHelper::parseUnifiedMemoryProperties (properties, unifiedMemoryProperties)) {
3486+ cl_mem_flags flags = 0 ;
3487+ cl_mem_flags_intel flagsIntel = 0 ;
3488+ cl_mem_alloc_flags_intel allocflags = 0 ;
3489+ if (!MemoryPropertiesParser::parseMemoryProperties (properties, unifiedMemoryProperties.allocationFlags , flags, flagsIntel, allocflags, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::UNKNOWN)) {
34823490 err.set (CL_INVALID_VALUE);
34833491 return nullptr ;
34843492 }
@@ -3512,7 +3520,10 @@ void *clSharedMemAllocINTEL(
35123520 }
35133521
35143522 SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties (InternalMemoryType::SHARED_UNIFIED_MEMORY);
3515- if (!MemObjHelper::parseUnifiedMemoryProperties (properties, unifiedMemoryProperties)) {
3523+ cl_mem_flags flags = 0 ;
3524+ cl_mem_flags_intel flagsIntel = 0 ;
3525+ cl_mem_alloc_flags_intel allocflags = 0 ;
3526+ if (!MemoryPropertiesParser::parseMemoryProperties (properties, unifiedMemoryProperties.allocationFlags , flags, flagsIntel, allocflags, MemoryPropertiesParser::MemoryPropertiesParser::ObjType::UNKNOWN)) {
35163527 err.set (CL_INVALID_VALUE);
35173528 return nullptr ;
35183529 }
@@ -3595,7 +3606,7 @@ cl_int clGetMemAllocInfoINTEL(
35953606 return retVal;
35963607 }
35973608 case CL_MEM_ALLOC_FLAGS_INTEL: {
3598- retVal = info.set <uint64_t >(unifiedMemoryAllocation->allocationFlagsProperty );
3609+ retVal = info.set <uint32_t >(unifiedMemoryAllocation->allocationFlagsProperty . allAllocFlags );
35993610 return retVal;
36003611 }
36013612 case CL_MEM_ALLOC_DEVICE_INTEL: {
0 commit comments