@@ -1070,6 +1070,68 @@ CL_API_ENTRY cl_mem CL_API_CALL CLIRN(clCreateBufferWithProperties)(
10701070 NULL_FUNCTION_POINTER_SET_ERROR_RETURN_NULL (errcode_ret);
10711071}
10721072
1073+ // /////////////////////////////////////////////////////////////////////////////
1074+ //
1075+ // cl_intel_create_buffer_with_properties
1076+ // This function should stay in sync with clCreateBufferWithProperties, above.
1077+ CL_API_ENTRY cl_mem CL_API_CALL clCreateBufferWithPropertiesINTEL (
1078+ cl_context context,
1079+ const cl_mem_properties_intel* properties,
1080+ cl_mem_flags flags,
1081+ size_t size,
1082+ void * host_ptr,
1083+ cl_int* errcode_ret )
1084+ {
1085+ CLIntercept* pIntercept = GetIntercept ();
1086+
1087+ if ( pIntercept )
1088+ {
1089+ const auto & dispatchX = pIntercept->dispatchX (context);
1090+ if ( dispatchX.clCreateBufferWithPropertiesINTEL )
1091+ {
1092+ GET_ENQUEUE_COUNTER ();
1093+
1094+ std::string propsStr;
1095+ if ( pIntercept->config ().CallLogging )
1096+ {
1097+ pIntercept->getMemPropertiesString (
1098+ properties,
1099+ propsStr );
1100+ }
1101+ CALL_LOGGING_ENTER ( " context = %p, properties = [ %s ], flags = %s (%llX), size = %zu, host_ptr = %p" ,
1102+ context,
1103+ propsStr.c_str (),
1104+ pIntercept->enumName ().name_mem_flags ( flags ).c_str (),
1105+ flags,
1106+ size,
1107+ host_ptr );
1108+ INITIALIZE_BUFFER_CONTENTS_INIT ( flags, size, host_ptr );
1109+ CHECK_ERROR_INIT ( errcode_ret );
1110+ HOST_PERFORMANCE_TIMING_START ();
1111+
1112+ cl_mem retVal = dispatchX.clCreateBufferWithPropertiesINTEL (
1113+ context,
1114+ properties,
1115+ flags,
1116+ size,
1117+ host_ptr,
1118+ errcode_ret );
1119+
1120+ HOST_PERFORMANCE_TIMING_END ();
1121+ ADD_BUFFER ( retVal );
1122+ INITIALIZE_BUFFER_CONTENTS_CLEANUP ( flags, host_ptr );
1123+ DUMP_BUFFER_AFTER_CREATE ( retVal, flags, host_ptr, size );
1124+ CHECK_ERROR ( errcode_ret[0 ] );
1125+ ADD_OBJECT_ALLOCATION ( retVal );
1126+ CALL_LOGGING_EXIT ( errcode_ret[0 ], " returned %p" , retVal );
1127+
1128+ return retVal;
1129+ }
1130+ }
1131+
1132+ NULL_FUNCTION_POINTER_SET_ERROR_RETURN_NULL (errcode_ret);
1133+ }
1134+
10731135// /////////////////////////////////////////////////////////////////////////////
10741136//
10751137// cl_nv_create_buffer
0 commit comments