@@ -8767,6 +8767,102 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR(
87678767 NULL_FUNCTION_POINTER_RETURN_ERROR ();
87688768}
87698769
8770+ // /////////////////////////////////////////////////////////////////////////////
8771+ //
8772+ // cl_ext_image_requirements_info
8773+ CL_API_ENTRY cl_int CL_API_CALL clGetImageRequirementsInfoEXT (
8774+ cl_context context,
8775+ const cl_mem_properties* properties,
8776+ cl_mem_flags flags,
8777+ const cl_image_format* image_format,
8778+ const cl_image_desc* image_desc,
8779+ cl_image_requirements_info_ext param_name,
8780+ size_t param_value_size,
8781+ void * param_value,
8782+ size_t * param_value_size_ret)
8783+ {
8784+ CLIntercept* pIntercept = GetIntercept ();
8785+
8786+ if ( pIntercept )
8787+ {
8788+ const auto & dispatchX = pIntercept->dispatchX (context);
8789+ if ( dispatchX.clGetImageRequirementsInfoEXT )
8790+ {
8791+ GET_ENQUEUE_COUNTER ();
8792+ if ( image_desc && image_format )
8793+ {
8794+ std::string propsStr;
8795+ if ( pIntercept->config ().CallLogging )
8796+ {
8797+ pIntercept->getMemPropertiesString (
8798+ properties,
8799+ propsStr );
8800+ }
8801+ CALL_LOGGING_ENTER (
8802+ " context = %p, "
8803+ " properties = [ %s ], "
8804+ " flags = %s (%llX), "
8805+ " format->channel_order = %s, "
8806+ " format->channel_data_type = %s, "
8807+ " desc->type = %s, "
8808+ " desc->width = %zu, "
8809+ " desc->height = %zu, "
8810+ " desc->depth = %zu, "
8811+ " desc->array_size = %zu, "
8812+ " desc->row_pitch = %zu, "
8813+ " desc->slice_pitch = %zu, "
8814+ " desc->num_mip_levels = %u, "
8815+ " desc->num_samples = %u, "
8816+ " desc->mem_object = %p, "
8817+ " param_name = %s (%08X)" ,
8818+ context,
8819+ propsStr.c_str (),
8820+ pIntercept->enumName ().name_mem_flags ( flags ).c_str (),
8821+ flags,
8822+ pIntercept->enumName ().name ( image_format->image_channel_order ).c_str (),
8823+ pIntercept->enumName ().name ( image_format->image_channel_data_type ).c_str (),
8824+ pIntercept->enumName ().name ( image_desc->image_type ).c_str (),
8825+ image_desc->image_width ,
8826+ image_desc->image_height ,
8827+ image_desc->image_depth ,
8828+ image_desc->image_array_size ,
8829+ image_desc->image_row_pitch ,
8830+ image_desc->image_slice_pitch ,
8831+ image_desc->num_mip_levels ,
8832+ image_desc->num_samples ,
8833+ image_desc->mem_object ,
8834+ pIntercept->enumName ().name ( param_name ).c_str (),
8835+ param_name );
8836+ }
8837+ else
8838+ {
8839+ CALL_LOGGING_ENTER ();
8840+ }
8841+
8842+ HOST_PERFORMANCE_TIMING_START ();
8843+
8844+ cl_int retVal = dispatchX.clGetImageRequirementsInfoEXT (
8845+ context,
8846+ properties,
8847+ flags,
8848+ image_format,
8849+ image_desc,
8850+ param_name,
8851+ param_value_size,
8852+ param_value,
8853+ param_value_size_ret);
8854+
8855+ HOST_PERFORMANCE_TIMING_END ();
8856+ CHECK_ERROR ( retVal );
8857+ CALL_LOGGING_EXIT ( retVal );
8858+
8859+ return retVal;
8860+ }
8861+ }
8862+
8863+ NULL_FUNCTION_POINTER_RETURN_ERROR ();
8864+ }
8865+
87708866// /////////////////////////////////////////////////////////////////////////////
87718867//
87728868// Unofficial cl_get_kernel_suggested_local_work_size extension:
0 commit comments