зеркало из https://github.com/AvaloniaUI/angle.git
CL: Move object cast from entry points to stubs and front end
Move the OpenCl object cast from the generated entry points to the stubs and front end, to make it possible to properly use static_cast. This removes the limitation that the front end objects have to be standard layout (and makes it possible to use virtual functions), which is consistent with other front end objects. Move the back end initialization from the stubs to the entry point functions, which fixes a bug where the back ends were not initialized during validation. Move more code from the stubs to the front end, to keep the stubs light. Remove unused function `default_return_value` from `generate_entry_points.py`. Bug: angleproject:5904 Change-Id: Id999ad6c537888017bf3252c6f6e088b7d4c7984 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897245 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Родитель
b16ee28026
Коммит
a7ae63e479
|
@ -10,7 +10,7 @@
|
|||
"scripts/entry_point_packed_gl_enums.json":
|
||||
"4f7b43863a5e61991bba4010db463679",
|
||||
"scripts/generate_entry_points.py":
|
||||
"a749fa006d3da248f415b07e4b9ecf35",
|
||||
"e188b924a861e07840c39399e6826dd6",
|
||||
"scripts/gl.xml":
|
||||
"2a73a58a7e26d8676a2c0af6d528cae6",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
|
@ -74,7 +74,7 @@
|
|||
"src/libANGLE/capture/frame_capture_utils_autogen.h":
|
||||
"4405cac61b4f79b893bd40c7fc452397",
|
||||
"src/libANGLE/validationCL_autogen.h":
|
||||
"7fd03346f5cb8859f45cdd380af4bc64",
|
||||
"605034156dbc715aeac197c7db56c684",
|
||||
"src/libANGLE/validationEGL_autogen.h":
|
||||
"3927fa260ad183fd9193d65b3f8d82c5",
|
||||
"src/libANGLE/validationES1_autogen.h":
|
||||
|
@ -122,7 +122,7 @@
|
|||
"src/libGL/libGL_autogen.def":
|
||||
"2789d87b05eea9f53d52e2aff499b785",
|
||||
"src/libGLESv2/cl_stubs_autogen.h":
|
||||
"15437a0236c79d37f2ee4655fc99409f",
|
||||
"90fd22a3e8665b3f9ff807db8ffedf0d",
|
||||
"src/libGLESv2/egl_ext_stubs_autogen.h":
|
||||
"2ef3b8d087f2a97f7270b96077c93856",
|
||||
"src/libGLESv2/egl_get_labeled_object_data.json":
|
||||
|
@ -130,7 +130,7 @@
|
|||
"src/libGLESv2/egl_stubs_autogen.h":
|
||||
"6439daa350c1663e71dd0af37dcc91df",
|
||||
"src/libGLESv2/entry_points_cl_autogen.cpp":
|
||||
"2b2176bb17ed88bdb5aa2d6e9424608f",
|
||||
"858f3c2bf35186a82d4bae4129926aa8",
|
||||
"src/libGLESv2/entry_points_cl_autogen.h":
|
||||
"dde2f94c3004874a7da995dae69da811",
|
||||
"src/libGLESv2/entry_points_egl_autogen.cpp":
|
||||
|
|
|
@ -39,6 +39,17 @@ ALIASING_EXCEPTIONS = [
|
|||
'renderbufferStorageMultisampleEXT',
|
||||
]
|
||||
|
||||
# These are the entry points which potentially are used first by an application
|
||||
# and require that the back ends are initialized before the front end is called.
|
||||
INIT_DICT = {
|
||||
"clGetPlatformIDs": "false",
|
||||
"clGetPlatformInfo": "false",
|
||||
"clGetDeviceIDs": "false",
|
||||
"clCreateContext": "false",
|
||||
"clCreateContextFromType": "false",
|
||||
"clIcdGetPlatformIDsKHR": "true",
|
||||
}
|
||||
|
||||
# Strip these suffixes from Context entry point names. NV is excluded (for now).
|
||||
STRIP_SUFFIXES = ["ANDROID", "ANGLE", "EXT", "KHR", "OES", "CHROMIUM", "OVR"]
|
||||
|
||||
|
@ -246,6 +257,7 @@ TEMPLATE_CL_ENTRY_POINT_NO_RETURN = """\
|
|||
void CL_API_CALL cl{name}({params})
|
||||
{{
|
||||
ANGLE_SCOPED_GLOBAL_LOCK();
|
||||
|
||||
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
|
||||
|
||||
{packed_gl_enum_conversions}
|
||||
|
@ -260,6 +272,8 @@ TEMPLATE_CL_ENTRY_POINT_WITH_RETURN_ERROR = """\
|
|||
cl_int CL_API_CALL cl{name}({params})
|
||||
{{
|
||||
ANGLE_SCOPED_GLOBAL_LOCK();
|
||||
{initialization}
|
||||
|
||||
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
|
||||
|
||||
{packed_gl_enum_conversions}
|
||||
|
@ -274,6 +288,8 @@ TEMPLATE_CL_ENTRY_POINT_WITH_RETURN_POINTER = """\
|
|||
{return_type} CL_API_CALL cl{name}({params})
|
||||
{{
|
||||
ANGLE_SCOPED_GLOBAL_LOCK();
|
||||
{initialization}
|
||||
|
||||
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
|
||||
|
||||
{packed_gl_enum_conversions}
|
||||
|
@ -1200,24 +1216,6 @@ CL_PACKED_TYPES = {
|
|||
"cl_kernel_exec_info": "KernelExecInfo",
|
||||
"cl_event_info": "EventInfo",
|
||||
"cl_profiling_info": "ProfilingInfo",
|
||||
# Objects
|
||||
"cl_platform_id": "Platform *",
|
||||
"cl_platform_id*": "Platform **",
|
||||
"cl_device_id": "Device *",
|
||||
"cl_device_id*": "Device **",
|
||||
"const cl_device_id*": "Device *const *",
|
||||
"cl_context": "Context *",
|
||||
"cl_command_queue": "CommandQueue *",
|
||||
"cl_mem": "Memory *",
|
||||
"const cl_mem*": "Memory *const *",
|
||||
"cl_program": "Program *",
|
||||
"const cl_program*": "Program *const *",
|
||||
"cl_kernel": "Kernel *",
|
||||
"cl_kernel*": "Kernel **",
|
||||
"cl_event": "Event *",
|
||||
"cl_event*": "Event **",
|
||||
"const cl_event*": "Event *const *",
|
||||
"cl_sampler": "Sampler *",
|
||||
}
|
||||
|
||||
EGL_PACKED_TYPES = {
|
||||
|
@ -1402,13 +1400,6 @@ def param_format_string(param):
|
|||
return just_the_name(param) + " = " + FORMAT_DICT[type_only]
|
||||
|
||||
|
||||
def default_return_value(cmd_name, return_type):
|
||||
if return_type == "void":
|
||||
return ""
|
||||
return "GetDefaultReturnValue<EntryPoint::%s, %s>()" % (strip_api_prefix(cmd_name),
|
||||
return_type)
|
||||
|
||||
|
||||
def is_context_lost_acceptable_cmd(cmd_name):
|
||||
lost_context_acceptable_cmds = [
|
||||
"glGetError",
|
||||
|
@ -1527,7 +1518,7 @@ def format_entry_point_def(api, command_node, cmd_name, proto, params, is_explic
|
|||
pass_params = [param_print_argument(command_node, param) for param in params]
|
||||
format_params = [param_format_string(param) for param in params]
|
||||
return_type = proto[:-len(cmd_name)].strip()
|
||||
default_return = default_return_value(cmd_name, return_type)
|
||||
initialization = "InitBackEnds(%s);" % INIT_DICT[cmd_name] if cmd_name in INIT_DICT else ""
|
||||
event_comment = TEMPLATE_EVENT_COMMENT if cmd_name in NO_EVENT_MARKER_EXCEPTIONS_LIST else ""
|
||||
name_lower_no_suffix = strip_suffix(api, cmd_name[2:3].lower() + cmd_name[3:])
|
||||
|
||||
|
@ -1542,6 +1533,8 @@ def format_entry_point_def(api, command_node, cmd_name, proto, params, is_explic
|
|||
", ".join(params),
|
||||
"internal_params":
|
||||
", ".join(internal_params),
|
||||
"initialization":
|
||||
initialization,
|
||||
"packed_gl_enum_conversions":
|
||||
"".join(packed_gl_enum_conversions),
|
||||
"pass_params":
|
||||
|
|
|
@ -75,7 +75,7 @@ cl_int Context::getInfo(ContextInfo name, size_t valueSize, void *value, size_t
|
|||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
bool Context::IsValid(const Context *context)
|
||||
bool Context::IsValid(const _cl_context *context)
|
||||
{
|
||||
const Platform::PtrList &platforms = Platform::GetPlatforms();
|
||||
return std::find_if(platforms.cbegin(), platforms.cend(), [=](const Platform::Ptr &platform) {
|
||||
|
|
|
@ -35,7 +35,7 @@ class Context final : public _cl_context, public Object
|
|||
|
||||
cl_int getInfo(ContextInfo name, size_t valueSize, void *value, size_t *valueSizeRet);
|
||||
|
||||
static bool IsValid(const Context *context);
|
||||
static bool IsValid(const _cl_context *context);
|
||||
|
||||
private:
|
||||
Context(Platform &platform,
|
||||
|
|
|
@ -323,7 +323,7 @@ cl_int Device::getInfo(DeviceInfo name, size_t valueSize, void *value, size_t *v
|
|||
|
||||
cl_int Device::createSubDevices(const cl_device_partition_property *properties,
|
||||
cl_uint numDevices,
|
||||
Device **devices,
|
||||
cl_device_id *devices,
|
||||
cl_uint *numDevicesRet)
|
||||
{
|
||||
if (devices == nullptr)
|
||||
|
@ -367,7 +367,7 @@ Device::PtrList Device::CreateDevices(Platform &platform, rx::CLDeviceImpl::PtrL
|
|||
return devices;
|
||||
}
|
||||
|
||||
bool Device::IsValid(const Device *device)
|
||||
bool Device::IsValid(const _cl_device_id *device)
|
||||
{
|
||||
const Platform::PtrList &platforms = Platform::GetPlatforms();
|
||||
return std::find_if(platforms.cbegin(), platforms.cend(), [=](const Platform::Ptr &platform) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class Device final : public _cl_device_id, public Object
|
|||
|
||||
Platform &getPlatform() const noexcept;
|
||||
bool isRoot() const noexcept;
|
||||
bool hasSubDevice(const Device *device) const;
|
||||
bool hasSubDevice(const _cl_device_id *device) const;
|
||||
|
||||
void retain() noexcept;
|
||||
bool release();
|
||||
|
@ -38,12 +38,12 @@ class Device final : public _cl_device_id, public Object
|
|||
|
||||
cl_int createSubDevices(const cl_device_partition_property *properties,
|
||||
cl_uint numDevices,
|
||||
Device **devices,
|
||||
cl_device_id *devices,
|
||||
cl_uint *numDevicesRet);
|
||||
|
||||
static PtrList CreateDevices(Platform &platform, rx::CLDeviceImpl::PtrList &&implList);
|
||||
|
||||
static bool IsValid(const Device *device);
|
||||
static bool IsValid(const _cl_device_id *device);
|
||||
static bool IsValidType(cl_device_type type);
|
||||
|
||||
private:
|
||||
|
@ -74,7 +74,7 @@ inline bool Device::isRoot() const noexcept
|
|||
return mParent == nullptr;
|
||||
}
|
||||
|
||||
inline bool Device::hasSubDevice(const Device *device) const
|
||||
inline bool Device::hasSubDevice(const _cl_device_id *device) const
|
||||
{
|
||||
return std::find_if(mSubDevices.cbegin(), mSubDevices.cend(), [=](const Device::Ptr &ptr) {
|
||||
return ptr.get() == device || ptr->hasSubDevice(device);
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace cl
|
|||
|
||||
namespace
|
||||
{
|
||||
|
||||
bool IsDeviceTypeMatch(cl_device_type select, cl_device_type type)
|
||||
{
|
||||
// The type 'cl_device_type' is a bitfield, so masking out the selected bits indicates
|
||||
|
@ -23,6 +24,42 @@ bool IsDeviceTypeMatch(cl_device_type select, cl_device_type type)
|
|||
// https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clGetDeviceIDs
|
||||
return type == CL_DEVICE_TYPE_CUSTOM ? select == CL_DEVICE_TYPE_CUSTOM : (type & select) != 0u;
|
||||
}
|
||||
|
||||
Context::PropArray ParseContextProperties(const cl_context_properties *properties,
|
||||
Platform *&platform,
|
||||
bool &userSync)
|
||||
{
|
||||
Context::PropArray propArray;
|
||||
if (properties != nullptr)
|
||||
{
|
||||
// Count the trailing zero
|
||||
size_t propSize = 1u;
|
||||
const cl_context_properties *propIt = properties;
|
||||
while (*propIt != 0)
|
||||
{
|
||||
++propSize;
|
||||
switch (*propIt++)
|
||||
{
|
||||
case CL_CONTEXT_PLATFORM:
|
||||
platform = reinterpret_cast<Platform *>(*propIt++);
|
||||
++propSize;
|
||||
break;
|
||||
case CL_CONTEXT_INTEROP_USER_SYNC:
|
||||
userSync = *propIt++ != CL_FALSE;
|
||||
++propSize;
|
||||
break;
|
||||
}
|
||||
}
|
||||
propArray.reserve(propSize);
|
||||
propArray.insert(propArray.cend(), properties, properties + propSize);
|
||||
}
|
||||
if (platform == nullptr)
|
||||
{
|
||||
platform = Platform::GetDefault();
|
||||
}
|
||||
return propArray;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Platform::~Platform()
|
||||
|
@ -136,7 +173,7 @@ cl_int Platform::getInfo(PlatformInfo name, size_t valueSize, void *value, size_
|
|||
|
||||
cl_int Platform::getDeviceIDs(cl_device_type deviceType,
|
||||
cl_uint numEntries,
|
||||
Device **devices,
|
||||
cl_device_id *devices,
|
||||
cl_uint *numDevices) const
|
||||
{
|
||||
cl_uint found = 0u;
|
||||
|
@ -160,44 +197,74 @@ cl_int Platform::getDeviceIDs(cl_device_type deviceType,
|
|||
return found == 0u ? CL_DEVICE_NOT_FOUND : CL_SUCCESS;
|
||||
}
|
||||
|
||||
Context *Platform::createContext(Context::PropArray &&properties,
|
||||
cl_uint numDevices,
|
||||
Device *const *devices,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
bool userSync,
|
||||
cl_int *errcodeRet)
|
||||
cl_int Platform::GetPlatformIDs(cl_uint num_entries,
|
||||
cl_platform_id *platforms,
|
||||
cl_uint *num_platforms)
|
||||
{
|
||||
const PtrList &platformList = GetList();
|
||||
if (num_platforms != nullptr)
|
||||
{
|
||||
*num_platforms = static_cast<cl_uint>(platformList.size());
|
||||
}
|
||||
if (platforms != nullptr)
|
||||
{
|
||||
cl_uint entry = 0u;
|
||||
auto platformIt = platformList.cbegin();
|
||||
while (entry < num_entries && platformIt != platformList.cend())
|
||||
{
|
||||
platforms[entry++] = (*platformIt++).get();
|
||||
}
|
||||
}
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
cl_context Platform::CreateContext(const cl_context_properties *properties,
|
||||
cl_uint numDevices,
|
||||
const cl_device_id *devices,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
cl_int *errcodeRet)
|
||||
{
|
||||
Platform *platform = nullptr;
|
||||
bool userSync = false;
|
||||
Context::PropArray propArray = ParseContextProperties(properties, platform, userSync);
|
||||
ASSERT(platform != nullptr);
|
||||
Device::RefList refDevices;
|
||||
while (numDevices-- != 0u)
|
||||
{
|
||||
refDevices.emplace_back(*devices++);
|
||||
refDevices.emplace_back(static_cast<Device *>(*devices++));
|
||||
}
|
||||
mContexts.emplace_back(new Context(*this, std::move(properties), std::move(refDevices), notify,
|
||||
userData, userSync, errcodeRet));
|
||||
if (!mContexts.back()->mImpl)
|
||||
|
||||
platform->mContexts.emplace_back(new Context(*platform, std::move(propArray),
|
||||
std::move(refDevices), notify, userData, userSync,
|
||||
errcodeRet));
|
||||
if (!platform->mContexts.back()->mImpl)
|
||||
{
|
||||
mContexts.back()->release();
|
||||
platform->mContexts.back()->release();
|
||||
return nullptr;
|
||||
}
|
||||
return mContexts.back().get();
|
||||
return platform->mContexts.back().get();
|
||||
}
|
||||
|
||||
Context *Platform::createContextFromType(Context::PropArray &&properties,
|
||||
cl_device_type deviceType,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
bool userSync,
|
||||
cl_int *errcodeRet)
|
||||
cl_context Platform::CreateContextFromType(const cl_context_properties *properties,
|
||||
cl_device_type deviceType,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
cl_int *errcodeRet)
|
||||
{
|
||||
mContexts.emplace_back(new Context(*this, std::move(properties), deviceType, notify, userData,
|
||||
userSync, errcodeRet));
|
||||
if (!mContexts.back()->mImpl || mContexts.back()->mDevices.empty())
|
||||
Platform *platform = nullptr;
|
||||
bool userSync = false;
|
||||
Context::PropArray propArray = ParseContextProperties(properties, platform, userSync);
|
||||
ASSERT(platform != nullptr);
|
||||
|
||||
platform->mContexts.emplace_back(new Context(*platform, std::move(propArray), deviceType,
|
||||
notify, userData, userSync, errcodeRet));
|
||||
if (!platform->mContexts.back()->mImpl || platform->mContexts.back()->mDevices.empty())
|
||||
{
|
||||
mContexts.back()->release();
|
||||
platform->mContexts.back()->release();
|
||||
return nullptr;
|
||||
}
|
||||
return mContexts.back().get();
|
||||
return platform->mContexts.back().get();
|
||||
}
|
||||
|
||||
void Platform::CreatePlatform(const cl_icd_dispatch &dispatch,
|
||||
|
|
|
@ -26,40 +26,45 @@ class Platform final : public _cl_platform_id, public Object
|
|||
|
||||
~Platform();
|
||||
|
||||
bool hasDevice(const Device *device) const;
|
||||
bool hasDevice(const _cl_device_id *device) const;
|
||||
const Device::PtrList &getDevices() const;
|
||||
Device::RefList mapDevices(const rx::CLDeviceImpl::List &deviceImplList) const;
|
||||
|
||||
bool hasContext(const Context *context) const;
|
||||
bool hasContext(const _cl_context *context) const;
|
||||
|
||||
cl_int getInfo(PlatformInfo name, size_t valueSize, void *value, size_t *valueSizeRet);
|
||||
|
||||
cl_int getDeviceIDs(cl_device_type deviceType,
|
||||
cl_uint numEntries,
|
||||
Device **devices,
|
||||
cl_device_id *devices,
|
||||
cl_uint *numDevices) const;
|
||||
|
||||
Context *createContext(Context::PropArray &&properties,
|
||||
cl_uint numDevices,
|
||||
Device *const *devices,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
bool userSync,
|
||||
cl_int *errcodeRet);
|
||||
static cl_int GetPlatformIDs(cl_uint num_entries,
|
||||
cl_platform_id *platforms,
|
||||
cl_uint *num_platforms);
|
||||
|
||||
Context *createContextFromType(Context::PropArray &&properties,
|
||||
cl_device_type deviceType,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
bool userSync,
|
||||
cl_int *errcodeRet);
|
||||
static cl_context CreateContext(const cl_context_properties *properties,
|
||||
cl_uint numDevices,
|
||||
const cl_device_id *devices,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
cl_int *errcodeRet);
|
||||
|
||||
static cl_context CreateContextFromType(const cl_context_properties *properties,
|
||||
cl_device_type deviceType,
|
||||
ContextErrorCB notify,
|
||||
void *userData,
|
||||
cl_int *errcodeRet);
|
||||
|
||||
static void CreatePlatform(const cl_icd_dispatch &dispatch,
|
||||
rx::CLPlatformImpl::InitData &initData);
|
||||
static const PtrList &GetPlatforms();
|
||||
|
||||
static Platform *GetDefault();
|
||||
static bool IsValid(const Platform *platform);
|
||||
static bool IsValidOrDefault(const Platform *platform);
|
||||
static Platform *CastOrDefault(cl_platform_id platform);
|
||||
|
||||
static bool IsValid(const _cl_platform_id *platform);
|
||||
static bool IsValidOrDefault(const _cl_platform_id *platform);
|
||||
|
||||
static constexpr const char *GetVendor();
|
||||
|
||||
|
@ -88,7 +93,7 @@ class Platform final : public _cl_platform_id, public Object
|
|||
friend class Context;
|
||||
};
|
||||
|
||||
inline bool Platform::hasDevice(const Device *device) const
|
||||
inline bool Platform::hasDevice(const _cl_device_id *device) const
|
||||
{
|
||||
return std::find_if(mDevices.cbegin(), mDevices.cend(), [=](const Device::Ptr &ptr) {
|
||||
return ptr.get() == device || ptr->hasSubDevice(device);
|
||||
|
@ -100,7 +105,7 @@ inline const Device::PtrList &Platform::getDevices() const
|
|||
return mDevices;
|
||||
}
|
||||
|
||||
inline bool Platform::hasContext(const Context *context) const
|
||||
inline bool Platform::hasContext(const _cl_context *context) const
|
||||
{
|
||||
return std::find_if(mContexts.cbegin(), mContexts.cend(), [=](const Context::Ptr &ptr) {
|
||||
return ptr.get() == context;
|
||||
|
@ -123,7 +128,12 @@ inline Platform *Platform::GetDefault()
|
|||
return GetList().empty() ? nullptr : GetList().front().get();
|
||||
}
|
||||
|
||||
inline bool Platform::IsValid(const Platform *platform)
|
||||
inline Platform *Platform::CastOrDefault(cl_platform_id platform)
|
||||
{
|
||||
return platform != nullptr ? static_cast<Platform *>(platform) : GetDefault();
|
||||
}
|
||||
|
||||
inline bool Platform::IsValid(const _cl_platform_id *platform)
|
||||
{
|
||||
const PtrList &platforms = GetPlatforms();
|
||||
return std::find_if(platforms.cbegin(), platforms.cend(),
|
||||
|
@ -132,7 +142,7 @@ inline bool Platform::IsValid(const Platform *platform)
|
|||
|
||||
// Our CL implementation defines that a nullptr value chooses the platform that we provide as
|
||||
// default, so this function returns true for a nullptr value if a default platform exists.
|
||||
inline bool Platform::IsValidOrDefault(const Platform *platform)
|
||||
inline bool Platform::IsValidOrDefault(const _cl_platform_id *platform)
|
||||
{
|
||||
return platform != nullptr ? IsValid(platform) : GetDefault() != nullptr;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -18,26 +18,26 @@ namespace cl
|
|||
|
||||
// CL 1.0
|
||||
cl_int ValidateGetPlatformIDs(cl_uint num_entries,
|
||||
Platform *const *platformsPacked,
|
||||
const cl_platform_id *platforms,
|
||||
const cl_uint *num_platforms);
|
||||
cl_int ValidateGetPlatformInfo(const Platform *platformPacked,
|
||||
cl_int ValidateGetPlatformInfo(cl_platform_id platform,
|
||||
PlatformInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateGetDeviceIDs(const Platform *platformPacked,
|
||||
cl_int ValidateGetDeviceIDs(cl_platform_id platform,
|
||||
cl_device_type device_type,
|
||||
cl_uint num_entries,
|
||||
Device *const *devicesPacked,
|
||||
const cl_device_id *devices,
|
||||
const cl_uint *num_devices);
|
||||
cl_int ValidateGetDeviceInfo(const Device *devicePacked,
|
||||
cl_int ValidateGetDeviceInfo(cl_device_id device,
|
||||
DeviceInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
bool ValidateCreateContext(const cl_context_properties *properties,
|
||||
cl_uint num_devices,
|
||||
Device *const *devicesPacked,
|
||||
const cl_device_id *devices,
|
||||
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
|
||||
const void *private_info,
|
||||
size_t cb,
|
||||
|
@ -52,149 +52,147 @@ bool ValidateCreateContextFromType(const cl_context_properties *properties,
|
|||
void *user_data),
|
||||
const void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateRetainContext(const Context *contextPacked);
|
||||
cl_int ValidateReleaseContext(const Context *contextPacked);
|
||||
cl_int ValidateGetContextInfo(const Context *contextPacked,
|
||||
cl_int ValidateRetainContext(cl_context context);
|
||||
cl_int ValidateReleaseContext(cl_context context);
|
||||
cl_int ValidateGetContextInfo(cl_context context,
|
||||
ContextInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateRetainCommandQueue(const CommandQueue *command_queuePacked);
|
||||
cl_int ValidateReleaseCommandQueue(const CommandQueue *command_queuePacked);
|
||||
cl_int ValidateGetCommandQueueInfo(const CommandQueue *command_queuePacked,
|
||||
cl_int ValidateRetainCommandQueue(cl_command_queue command_queue);
|
||||
cl_int ValidateReleaseCommandQueue(cl_command_queue command_queue);
|
||||
cl_int ValidateGetCommandQueueInfo(cl_command_queue command_queue,
|
||||
CommandQueueInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
bool ValidateCreateBuffer(const Context *contextPacked,
|
||||
bool ValidateCreateBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
size_t size,
|
||||
const void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateRetainMemObject(const Memory *memobjPacked);
|
||||
cl_int ValidateReleaseMemObject(const Memory *memobjPacked);
|
||||
cl_int ValidateGetSupportedImageFormats(const Context *contextPacked,
|
||||
cl_int ValidateRetainMemObject(cl_mem memobj);
|
||||
cl_int ValidateReleaseMemObject(cl_mem memobj);
|
||||
cl_int ValidateGetSupportedImageFormats(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
MemObjectType image_typePacked,
|
||||
cl_uint num_entries,
|
||||
const cl_image_format *image_formats,
|
||||
const cl_uint *num_image_formats);
|
||||
cl_int ValidateGetMemObjectInfo(const Memory *memobjPacked,
|
||||
cl_int ValidateGetMemObjectInfo(cl_mem memobj,
|
||||
MemInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateGetImageInfo(const Memory *imagePacked,
|
||||
cl_int ValidateGetImageInfo(cl_mem image,
|
||||
ImageInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateRetainSampler(const Sampler *samplerPacked);
|
||||
cl_int ValidateReleaseSampler(const Sampler *samplerPacked);
|
||||
cl_int ValidateGetSamplerInfo(const Sampler *samplerPacked,
|
||||
cl_int ValidateRetainSampler(cl_sampler sampler);
|
||||
cl_int ValidateReleaseSampler(cl_sampler sampler);
|
||||
cl_int ValidateGetSamplerInfo(cl_sampler sampler,
|
||||
SamplerInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
bool ValidateCreateProgramWithSource(const Context *contextPacked,
|
||||
bool ValidateCreateProgramWithSource(cl_context context,
|
||||
cl_uint count,
|
||||
const char **strings,
|
||||
const size_t *lengths,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreateProgramWithBinary(const Context *contextPacked,
|
||||
bool ValidateCreateProgramWithBinary(cl_context context,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const size_t *lengths,
|
||||
const unsigned char **binaries,
|
||||
const cl_int *binary_status,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateRetainProgram(const Program *programPacked);
|
||||
cl_int ValidateReleaseProgram(const Program *programPacked);
|
||||
cl_int ValidateBuildProgram(const Program *programPacked,
|
||||
cl_int ValidateRetainProgram(cl_program program);
|
||||
cl_int ValidateReleaseProgram(cl_program program);
|
||||
cl_int ValidateBuildProgram(cl_program program,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
const void *user_data);
|
||||
cl_int ValidateGetProgramInfo(const Program *programPacked,
|
||||
cl_int ValidateGetProgramInfo(cl_program program,
|
||||
ProgramInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateGetProgramBuildInfo(const Program *programPacked,
|
||||
const Device *devicePacked,
|
||||
cl_int ValidateGetProgramBuildInfo(cl_program program,
|
||||
cl_device_id device,
|
||||
ProgramBuildInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
bool ValidateCreateKernel(const Program *programPacked,
|
||||
const char *kernel_name,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateCreateKernelsInProgram(const Program *programPacked,
|
||||
bool ValidateCreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret);
|
||||
cl_int ValidateCreateKernelsInProgram(cl_program program,
|
||||
cl_uint num_kernels,
|
||||
Kernel *const *kernelsPacked,
|
||||
const cl_kernel *kernels,
|
||||
const cl_uint *num_kernels_ret);
|
||||
cl_int ValidateRetainKernel(const Kernel *kernelPacked);
|
||||
cl_int ValidateReleaseKernel(const Kernel *kernelPacked);
|
||||
cl_int ValidateSetKernelArg(const Kernel *kernelPacked,
|
||||
cl_int ValidateRetainKernel(cl_kernel kernel);
|
||||
cl_int ValidateReleaseKernel(cl_kernel kernel);
|
||||
cl_int ValidateSetKernelArg(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
size_t arg_size,
|
||||
const void *arg_value);
|
||||
cl_int ValidateGetKernelInfo(const Kernel *kernelPacked,
|
||||
cl_int ValidateGetKernelInfo(cl_kernel kernel,
|
||||
KernelInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateGetKernelWorkGroupInfo(const Kernel *kernelPacked,
|
||||
const Device *devicePacked,
|
||||
cl_int ValidateGetKernelWorkGroupInfo(cl_kernel kernel,
|
||||
cl_device_id device,
|
||||
KernelWorkGroupInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateWaitForEvents(cl_uint num_events, Event *const *event_listPacked);
|
||||
cl_int ValidateGetEventInfo(const Event *eventPacked,
|
||||
cl_int ValidateWaitForEvents(cl_uint num_events, const cl_event *event_list);
|
||||
cl_int ValidateGetEventInfo(cl_event event,
|
||||
EventInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateRetainEvent(const Event *eventPacked);
|
||||
cl_int ValidateReleaseEvent(const Event *eventPacked);
|
||||
cl_int ValidateGetEventProfilingInfo(const Event *eventPacked,
|
||||
cl_int ValidateRetainEvent(cl_event event);
|
||||
cl_int ValidateReleaseEvent(cl_event event);
|
||||
cl_int ValidateGetEventProfilingInfo(cl_event event,
|
||||
ProfilingInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateFlush(const CommandQueue *command_queuePacked);
|
||||
cl_int ValidateFinish(const CommandQueue *command_queuePacked);
|
||||
cl_int ValidateEnqueueReadBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
cl_int ValidateFlush(cl_command_queue command_queue);
|
||||
cl_int ValidateFinish(cl_command_queue command_queue);
|
||||
cl_int ValidateEnqueueReadBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_read,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueWriteBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueWriteBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_write,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueCopyBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *src_bufferPacked,
|
||||
const Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueCopyBuffer(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_buffer,
|
||||
size_t src_offset,
|
||||
size_t dst_offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueReadImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueReadImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_read,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
|
@ -202,10 +200,10 @@ cl_int ValidateEnqueueReadImage(const CommandQueue *command_queuePacked,
|
|||
size_t slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueWriteImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueWriteImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_write,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
|
@ -213,47 +211,47 @@ cl_int ValidateEnqueueWriteImage(const CommandQueue *command_queuePacked,
|
|||
size_t input_slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueCopyImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *src_imagePacked,
|
||||
const Memory *dst_imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueCopyImage(cl_command_queue command_queue,
|
||||
cl_mem src_image,
|
||||
cl_mem dst_image,
|
||||
const size_t *src_origin,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueCopyImageToBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *src_imagePacked,
|
||||
const Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueCopyImageToBuffer(cl_command_queue command_queue,
|
||||
cl_mem src_image,
|
||||
cl_mem dst_buffer,
|
||||
const size_t *src_origin,
|
||||
const size_t *region,
|
||||
size_t dst_offset,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueCopyBufferToImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *src_bufferPacked,
|
||||
const Memory *dst_imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueCopyBufferToImage(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_image,
|
||||
size_t src_offset,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
bool ValidateEnqueueMapBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
bool ValidateEnqueueMapBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags map_flags,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateEnqueueMapImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *imagePacked,
|
||||
bool ValidateEnqueueMapImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags map_flags,
|
||||
const size_t *origin,
|
||||
|
@ -261,39 +259,39 @@ bool ValidateEnqueueMapImage(const CommandQueue *command_queuePacked,
|
|||
const size_t *image_row_pitch,
|
||||
const size_t *image_slice_pitch,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateEnqueueUnmapMemObject(const CommandQueue *command_queuePacked,
|
||||
const Memory *memobjPacked,
|
||||
cl_int ValidateEnqueueUnmapMemObject(cl_command_queue command_queue,
|
||||
cl_mem memobj,
|
||||
const void *mapped_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueNDRangeKernel(const CommandQueue *command_queuePacked,
|
||||
const Kernel *kernelPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueNDRangeKernel(cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint work_dim,
|
||||
const size_t *global_work_offset,
|
||||
const size_t *global_work_size,
|
||||
const size_t *local_work_size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueNativeKernel(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueNativeKernel(cl_command_queue command_queue,
|
||||
void(CL_CALLBACK *user_func)(void *),
|
||||
const void *args,
|
||||
size_t cb_args,
|
||||
cl_uint num_mem_objects,
|
||||
Memory *const *mem_listPacked,
|
||||
const cl_mem *mem_list,
|
||||
const void **args_mem_loc,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateSetCommandQueueProperty(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateSetCommandQueueProperty(cl_command_queue command_queue,
|
||||
cl_command_queue_properties properties,
|
||||
cl_bool enable,
|
||||
const cl_command_queue_properties *old_properties);
|
||||
bool ValidateCreateImage2D(const Context *contextPacked,
|
||||
bool ValidateCreateImage2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
|
@ -301,7 +299,7 @@ bool ValidateCreateImage2D(const Context *contextPacked,
|
|||
size_t image_row_pitch,
|
||||
const void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreateImage3D(const Context *contextPacked,
|
||||
bool ValidateCreateImage3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
|
@ -311,48 +309,48 @@ bool ValidateCreateImage3D(const Context *contextPacked,
|
|||
size_t image_slice_pitch,
|
||||
const void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateEnqueueMarker(const CommandQueue *command_queuePacked, Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueWaitForEvents(const CommandQueue *command_queuePacked,
|
||||
cl_int ValidateEnqueueMarker(cl_command_queue command_queue, const cl_event *event);
|
||||
cl_int ValidateEnqueueWaitForEvents(cl_command_queue command_queue,
|
||||
cl_uint num_events,
|
||||
Event *const *event_listPacked);
|
||||
cl_int ValidateEnqueueBarrier(const CommandQueue *command_queuePacked);
|
||||
const cl_event *event_list);
|
||||
cl_int ValidateEnqueueBarrier(cl_command_queue command_queue);
|
||||
cl_int ValidateUnloadCompiler();
|
||||
bool ValidateGetExtensionFunctionAddress(const char *func_name);
|
||||
bool ValidateCreateCommandQueue(const Context *contextPacked,
|
||||
const Device *devicePacked,
|
||||
bool ValidateCreateCommandQueue(cl_context context,
|
||||
cl_device_id device,
|
||||
cl_command_queue_properties properties,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreateSampler(const Context *contextPacked,
|
||||
bool ValidateCreateSampler(cl_context context,
|
||||
cl_bool normalized_coords,
|
||||
AddressingMode addressing_modePacked,
|
||||
FilterMode filter_modePacked,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateEnqueueTask(const CommandQueue *command_queuePacked,
|
||||
const Kernel *kernelPacked,
|
||||
cl_int ValidateEnqueueTask(cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
|
||||
// CL 1.1
|
||||
bool ValidateCreateSubBuffer(const Memory *bufferPacked,
|
||||
bool ValidateCreateSubBuffer(cl_mem buffer,
|
||||
cl_mem_flags flags,
|
||||
cl_buffer_create_type buffer_create_type,
|
||||
const void *buffer_create_info,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateSetMemObjectDestructorCallback(const Memory *memobjPacked,
|
||||
cl_int ValidateSetMemObjectDestructorCallback(cl_mem memobj,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_mem memobj,
|
||||
void *user_data),
|
||||
const void *user_data);
|
||||
bool ValidateCreateUserEvent(const Context *contextPacked, cl_int *errcode_ret);
|
||||
cl_int ValidateSetUserEventStatus(const Event *eventPacked, cl_int execution_status);
|
||||
cl_int ValidateSetEventCallback(const Event *eventPacked,
|
||||
bool ValidateCreateUserEvent(cl_context context, cl_int *errcode_ret);
|
||||
cl_int ValidateSetUserEventStatus(cl_event event, cl_int execution_status);
|
||||
cl_int ValidateSetEventCallback(cl_event event,
|
||||
cl_int command_exec_callback_type,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_event event,
|
||||
cl_int event_command_status,
|
||||
void *user_data),
|
||||
const void *user_data);
|
||||
cl_int ValidateEnqueueReadBufferRect(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
cl_int ValidateEnqueueReadBufferRect(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_read,
|
||||
const size_t *buffer_origin,
|
||||
const size_t *host_origin,
|
||||
|
@ -363,10 +361,10 @@ cl_int ValidateEnqueueReadBufferRect(const CommandQueue *command_queuePacked,
|
|||
size_t host_slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueWriteBufferRect(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueWriteBufferRect(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_write,
|
||||
const size_t *buffer_origin,
|
||||
const size_t *host_origin,
|
||||
|
@ -377,11 +375,11 @@ cl_int ValidateEnqueueWriteBufferRect(const CommandQueue *command_queuePacked,
|
|||
size_t host_slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueCopyBufferRect(const CommandQueue *command_queuePacked,
|
||||
const Memory *src_bufferPacked,
|
||||
const Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueCopyBufferRect(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_buffer,
|
||||
const size_t *src_origin,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
|
@ -390,120 +388,114 @@ cl_int ValidateEnqueueCopyBufferRect(const CommandQueue *command_queuePacked,
|
|||
size_t dst_row_pitch,
|
||||
size_t dst_slice_pitch,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
|
||||
// CL 1.2
|
||||
cl_int ValidateCreateSubDevices(const Device *in_devicePacked,
|
||||
cl_int ValidateCreateSubDevices(cl_device_id in_device,
|
||||
const cl_device_partition_property *properties,
|
||||
cl_uint num_devices,
|
||||
Device *const *out_devicesPacked,
|
||||
const cl_device_id *out_devices,
|
||||
const cl_uint *num_devices_ret);
|
||||
cl_int ValidateRetainDevice(const Device *devicePacked);
|
||||
cl_int ValidateReleaseDevice(const Device *devicePacked);
|
||||
bool ValidateCreateImage(const Context *contextPacked,
|
||||
cl_int ValidateRetainDevice(cl_device_id device);
|
||||
cl_int ValidateReleaseDevice(cl_device_id device);
|
||||
bool ValidateCreateImage(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
const cl_image_desc *image_desc,
|
||||
const void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreateProgramWithBuiltInKernels(const Context *contextPacked,
|
||||
bool ValidateCreateProgramWithBuiltInKernels(cl_context context,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *kernel_names,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateCompileProgram(const Program *programPacked,
|
||||
cl_int ValidateCompileProgram(cl_program program,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
cl_uint num_input_headers,
|
||||
Program *const *input_headersPacked,
|
||||
const cl_program *input_headers,
|
||||
const char **header_include_names,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
const void *user_data);
|
||||
bool ValidateLinkProgram(const Context *contextPacked,
|
||||
bool ValidateLinkProgram(cl_context context,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
cl_uint num_input_programs,
|
||||
Program *const *input_programsPacked,
|
||||
const cl_program *input_programs,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
const void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateUnloadPlatformCompiler(const Platform *platformPacked);
|
||||
cl_int ValidateGetKernelArgInfo(const Kernel *kernelPacked,
|
||||
cl_int ValidateUnloadPlatformCompiler(cl_platform_id platform);
|
||||
cl_int ValidateGetKernelArgInfo(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
KernelArgInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateEnqueueFillBuffer(const CommandQueue *command_queuePacked,
|
||||
const Memory *bufferPacked,
|
||||
cl_int ValidateEnqueueFillBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
const void *pattern,
|
||||
size_t pattern_size,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueFillImage(const CommandQueue *command_queuePacked,
|
||||
const Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueFillImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
const void *fill_color,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueMigrateMemObjects(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueMigrateMemObjects(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
Memory *const *mem_objectsPacked,
|
||||
const cl_mem *mem_objects,
|
||||
cl_mem_migration_flags flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueMarkerWithWaitList(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueMarkerWithWaitList(cl_command_queue command_queue,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueBarrierWithWaitList(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueBarrierWithWaitList(cl_command_queue command_queue,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
bool ValidateGetExtensionFunctionAddressForPlatform(const Platform *platformPacked,
|
||||
const char *func_name);
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
bool ValidateGetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *func_name);
|
||||
|
||||
// CL 2.0
|
||||
bool ValidateCreateCommandQueueWithProperties(const Context *contextPacked,
|
||||
const Device *devicePacked,
|
||||
bool ValidateCreateCommandQueueWithProperties(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties *properties,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreatePipe(const Context *contextPacked,
|
||||
bool ValidateCreatePipe(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_uint pipe_packet_size,
|
||||
cl_uint pipe_max_packets,
|
||||
const cl_pipe_properties *properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateGetPipeInfo(const Memory *pipePacked,
|
||||
cl_int ValidateGetPipeInfo(cl_mem pipe,
|
||||
PipeInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
bool ValidateSVMAlloc(const Context *contextPacked,
|
||||
cl_svm_mem_flags flags,
|
||||
size_t size,
|
||||
cl_uint alignment);
|
||||
bool ValidateSVMFree(const Context *contextPacked, const void *svm_pointer);
|
||||
bool ValidateCreateSamplerWithProperties(const Context *contextPacked,
|
||||
bool ValidateSVMAlloc(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment);
|
||||
bool ValidateSVMFree(cl_context context, const void *svm_pointer);
|
||||
bool ValidateCreateSamplerWithProperties(cl_context context,
|
||||
const cl_sampler_properties *sampler_properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int ValidateSetKernelArgSVMPointer(const Kernel *kernelPacked,
|
||||
cl_uint arg_index,
|
||||
const void *arg_value);
|
||||
cl_int ValidateSetKernelExecInfo(const Kernel *kernelPacked,
|
||||
cl_int ValidateSetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value);
|
||||
cl_int ValidateSetKernelExecInfo(cl_kernel kernel,
|
||||
KernelExecInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value);
|
||||
cl_int ValidateEnqueueSVMFree(const CommandQueue *command_queuePacked,
|
||||
cl_int ValidateEnqueueSVMFree(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void *const svm_pointers[],
|
||||
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
|
||||
|
@ -512,90 +504,90 @@ cl_int ValidateEnqueueSVMFree(const CommandQueue *command_queuePacked,
|
|||
void *user_data),
|
||||
const void *user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueSVMMemcpy(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueSVMMemcpy(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
const void *dst_ptr,
|
||||
const void *src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueSVMMemFill(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueSVMMemFill(cl_command_queue command_queue,
|
||||
const void *svm_ptr,
|
||||
const void *pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueSVMMap(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueSVMMap(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
const void *svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
cl_int ValidateEnqueueSVMUnmap(const CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
cl_int ValidateEnqueueSVMUnmap(cl_command_queue command_queue,
|
||||
const void *svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
|
||||
// CL 2.1
|
||||
cl_int ValidateSetDefaultDeviceCommandQueue(const Context *contextPacked,
|
||||
const Device *devicePacked,
|
||||
const CommandQueue *command_queuePacked);
|
||||
cl_int ValidateGetDeviceAndHostTimer(const Device *devicePacked,
|
||||
cl_int ValidateSetDefaultDeviceCommandQueue(cl_context context,
|
||||
cl_device_id device,
|
||||
cl_command_queue command_queue);
|
||||
cl_int ValidateGetDeviceAndHostTimer(cl_device_id device,
|
||||
const cl_ulong *device_timestamp,
|
||||
const cl_ulong *host_timestamp);
|
||||
cl_int ValidateGetHostTimer(const Device *devicePacked, const cl_ulong *host_timestamp);
|
||||
bool ValidateCreateProgramWithIL(const Context *contextPacked,
|
||||
cl_int ValidateGetHostTimer(cl_device_id device, const cl_ulong *host_timestamp);
|
||||
bool ValidateCreateProgramWithIL(cl_context context,
|
||||
const void *il,
|
||||
size_t length,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCloneKernel(const Kernel *source_kernelPacked, cl_int *errcode_ret);
|
||||
cl_int ValidateGetKernelSubGroupInfo(const Kernel *kernelPacked,
|
||||
const Device *devicePacked,
|
||||
bool ValidateCloneKernel(cl_kernel source_kernel, cl_int *errcode_ret);
|
||||
cl_int ValidateGetKernelSubGroupInfo(cl_kernel kernel,
|
||||
cl_device_id device,
|
||||
KernelSubGroupInfo param_namePacked,
|
||||
size_t input_value_size,
|
||||
const void *input_value,
|
||||
size_t param_value_size,
|
||||
const void *param_value,
|
||||
const size_t *param_value_size_ret);
|
||||
cl_int ValidateEnqueueSVMMigrateMem(const CommandQueue *command_queuePacked,
|
||||
cl_int ValidateEnqueueSVMMigrateMem(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
const void **svm_pointers,
|
||||
const size_t *sizes,
|
||||
cl_mem_migration_flags flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event *const *eventPacked);
|
||||
const cl_event *event_wait_list,
|
||||
const cl_event *event);
|
||||
|
||||
// CL 2.2
|
||||
cl_int ValidateSetProgramReleaseCallback(const Program *programPacked,
|
||||
cl_int ValidateSetProgramReleaseCallback(cl_program program,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program,
|
||||
void *user_data),
|
||||
const void *user_data);
|
||||
cl_int ValidateSetProgramSpecializationConstant(const Program *programPacked,
|
||||
cl_int ValidateSetProgramSpecializationConstant(cl_program program,
|
||||
cl_uint spec_id,
|
||||
size_t spec_size,
|
||||
const void *spec_value);
|
||||
|
||||
// CL 3.0
|
||||
cl_int ValidateSetContextDestructorCallback(const Context *contextPacked,
|
||||
cl_int ValidateSetContextDestructorCallback(cl_context context,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_context context,
|
||||
void *user_data),
|
||||
const void *user_data);
|
||||
bool ValidateCreateBufferWithProperties(const Context *contextPacked,
|
||||
bool ValidateCreateBufferWithProperties(cl_context context,
|
||||
const cl_mem_properties *properties,
|
||||
cl_mem_flags flags,
|
||||
size_t size,
|
||||
const void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
bool ValidateCreateImageWithProperties(const Context *contextPacked,
|
||||
bool ValidateCreateImageWithProperties(cl_context context,
|
||||
const cl_mem_properties *properties,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
|
@ -605,7 +597,7 @@ bool ValidateCreateImageWithProperties(const Context *contextPacked,
|
|||
|
||||
// cl_khr_icd
|
||||
cl_int ValidateIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
Platform *const *platformsPacked,
|
||||
const cl_platform_id *platforms,
|
||||
const cl_uint *num_platforms);
|
||||
} // namespace cl
|
||||
|
||||
|
|
|
@ -592,6 +592,7 @@ libglesv2_cl_sources = [
|
|||
"src/libGLESv2/cl_stubs_autogen.h",
|
||||
"src/libGLESv2/entry_points_cl_autogen.cpp",
|
||||
"src/libGLESv2/entry_points_cl_autogen.h",
|
||||
"src/libGLESv2/entry_points_cl_utils.cpp",
|
||||
"src/libGLESv2/entry_points_cl_utils.h",
|
||||
"src/libGLESv2/proc_table_cl.h",
|
||||
"src/libGLESv2/proc_table_cl_autogen.cpp",
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -14,293 +14,288 @@
|
|||
|
||||
namespace cl
|
||||
{
|
||||
cl_int IcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
Platform **platformsPacked,
|
||||
cl_uint *num_platforms);
|
||||
cl_int GetPlatformIDs(cl_uint num_entries, Platform **platformsPacked, cl_uint *num_platforms);
|
||||
cl_int GetPlatformInfo(Platform *platformPacked,
|
||||
cl_int IcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
|
||||
cl_int GetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
|
||||
cl_int GetPlatformInfo(cl_platform_id platform,
|
||||
PlatformInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetDeviceIDs(Platform *platformPacked,
|
||||
cl_int GetDeviceIDs(cl_platform_id platform,
|
||||
cl_device_type device_type,
|
||||
cl_uint num_entries,
|
||||
Device **devicesPacked,
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
cl_int GetDeviceInfo(Device *devicePacked,
|
||||
cl_int GetDeviceInfo(cl_device_id device,
|
||||
DeviceInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int CreateSubDevices(Device *in_devicePacked,
|
||||
cl_int CreateSubDevices(cl_device_id in_device,
|
||||
const cl_device_partition_property *properties,
|
||||
cl_uint num_devices,
|
||||
Device **out_devicesPacked,
|
||||
cl_device_id *out_devices,
|
||||
cl_uint *num_devices_ret);
|
||||
cl_int RetainDevice(Device *devicePacked);
|
||||
cl_int ReleaseDevice(Device *devicePacked);
|
||||
cl_int SetDefaultDeviceCommandQueue(Context *contextPacked,
|
||||
Device *devicePacked,
|
||||
CommandQueue *command_queuePacked);
|
||||
cl_int GetDeviceAndHostTimer(Device *devicePacked,
|
||||
cl_int RetainDevice(cl_device_id device);
|
||||
cl_int ReleaseDevice(cl_device_id device);
|
||||
cl_int SetDefaultDeviceCommandQueue(cl_context context,
|
||||
cl_device_id device,
|
||||
cl_command_queue command_queue);
|
||||
cl_int GetDeviceAndHostTimer(cl_device_id device,
|
||||
cl_ulong *device_timestamp,
|
||||
cl_ulong *host_timestamp);
|
||||
cl_int GetHostTimer(Device *devicePacked, cl_ulong *host_timestamp);
|
||||
Context *CreateContext(const cl_context_properties *properties,
|
||||
cl_uint num_devices,
|
||||
Device *const *devicesPacked,
|
||||
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
|
||||
const void *private_info,
|
||||
size_t cb,
|
||||
void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
Context *CreateContextFromType(const cl_context_properties *properties,
|
||||
cl_device_type device_type,
|
||||
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
|
||||
const void *private_info,
|
||||
size_t cb,
|
||||
void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainContext(Context *contextPacked);
|
||||
cl_int ReleaseContext(Context *contextPacked);
|
||||
cl_int GetContextInfo(Context *contextPacked,
|
||||
cl_int GetHostTimer(cl_device_id device, cl_ulong *host_timestamp);
|
||||
cl_context CreateContext(const cl_context_properties *properties,
|
||||
cl_uint num_devices,
|
||||
const cl_device_id *devices,
|
||||
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
|
||||
const void *private_info,
|
||||
size_t cb,
|
||||
void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_context CreateContextFromType(const cl_context_properties *properties,
|
||||
cl_device_type device_type,
|
||||
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
|
||||
const void *private_info,
|
||||
size_t cb,
|
||||
void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainContext(cl_context context);
|
||||
cl_int ReleaseContext(cl_context context);
|
||||
cl_int GetContextInfo(cl_context context,
|
||||
ContextInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int SetContextDestructorCallback(Context *contextPacked,
|
||||
cl_int SetContextDestructorCallback(cl_context context,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_context context,
|
||||
void *user_data),
|
||||
void *user_data);
|
||||
CommandQueue *CreateCommandQueueWithProperties(Context *contextPacked,
|
||||
Device *devicePacked,
|
||||
const cl_queue_properties *properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainCommandQueue(CommandQueue *command_queuePacked);
|
||||
cl_int ReleaseCommandQueue(CommandQueue *command_queuePacked);
|
||||
cl_int GetCommandQueueInfo(CommandQueue *command_queuePacked,
|
||||
cl_command_queue CreateCommandQueueWithProperties(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties *properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainCommandQueue(cl_command_queue command_queue);
|
||||
cl_int ReleaseCommandQueue(cl_command_queue command_queue);
|
||||
cl_int GetCommandQueueInfo(cl_command_queue command_queue,
|
||||
CommandQueueInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
Memory *CreateBuffer(Context *contextPacked,
|
||||
cl_mem_flags flags,
|
||||
size_t size,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreateBufferWithProperties(Context *contextPacked,
|
||||
const cl_mem_properties *properties,
|
||||
cl_mem_flags flags,
|
||||
size_t size,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreateSubBuffer(Memory *bufferPacked,
|
||||
cl_mem_flags flags,
|
||||
cl_buffer_create_type buffer_create_type,
|
||||
const void *buffer_create_info,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreateImage(Context *contextPacked,
|
||||
cl_mem CreateBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
const cl_image_desc *image_desc,
|
||||
size_t size,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreateImageWithProperties(Context *contextPacked,
|
||||
cl_mem CreateBufferWithProperties(cl_context context,
|
||||
const cl_mem_properties *properties,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
const cl_image_desc *image_desc,
|
||||
size_t size,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreatePipe(Context *contextPacked,
|
||||
cl_mem CreateSubBuffer(cl_mem buffer,
|
||||
cl_mem_flags flags,
|
||||
cl_buffer_create_type buffer_create_type,
|
||||
const void *buffer_create_info,
|
||||
cl_int *errcode_ret);
|
||||
cl_mem CreateImage(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_uint pipe_packet_size,
|
||||
cl_uint pipe_max_packets,
|
||||
const cl_pipe_properties *properties,
|
||||
const cl_image_format *image_format,
|
||||
const cl_image_desc *image_desc,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainMemObject(Memory *memobjPacked);
|
||||
cl_int ReleaseMemObject(Memory *memobjPacked);
|
||||
cl_int GetSupportedImageFormats(Context *contextPacked,
|
||||
cl_mem CreateImageWithProperties(cl_context context,
|
||||
const cl_mem_properties *properties,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
const cl_image_desc *image_desc,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_mem CreatePipe(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_uint pipe_packet_size,
|
||||
cl_uint pipe_max_packets,
|
||||
const cl_pipe_properties *properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainMemObject(cl_mem memobj);
|
||||
cl_int ReleaseMemObject(cl_mem memobj);
|
||||
cl_int GetSupportedImageFormats(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
MemObjectType image_typePacked,
|
||||
cl_uint num_entries,
|
||||
cl_image_format *image_formats,
|
||||
cl_uint *num_image_formats);
|
||||
cl_int GetMemObjectInfo(Memory *memobjPacked,
|
||||
cl_int GetMemObjectInfo(cl_mem memobj,
|
||||
MemInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetImageInfo(Memory *imagePacked,
|
||||
cl_int GetImageInfo(cl_mem image,
|
||||
ImageInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetPipeInfo(Memory *pipePacked,
|
||||
cl_int GetPipeInfo(cl_mem pipe,
|
||||
PipeInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int SetMemObjectDestructorCallback(Memory *memobjPacked,
|
||||
cl_int SetMemObjectDestructorCallback(cl_mem memobj,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_mem memobj, void *user_data),
|
||||
void *user_data);
|
||||
void *SVMAlloc(Context *contextPacked, cl_svm_mem_flags flags, size_t size, cl_uint alignment);
|
||||
void SVMFree(Context *contextPacked, void *svm_pointer);
|
||||
Sampler *CreateSamplerWithProperties(Context *contextPacked,
|
||||
const cl_sampler_properties *sampler_properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainSampler(Sampler *samplerPacked);
|
||||
cl_int ReleaseSampler(Sampler *samplerPacked);
|
||||
cl_int GetSamplerInfo(Sampler *samplerPacked,
|
||||
void *SVMAlloc(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment);
|
||||
void SVMFree(cl_context context, void *svm_pointer);
|
||||
cl_sampler CreateSamplerWithProperties(cl_context context,
|
||||
const cl_sampler_properties *sampler_properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainSampler(cl_sampler sampler);
|
||||
cl_int ReleaseSampler(cl_sampler sampler);
|
||||
cl_int GetSamplerInfo(cl_sampler sampler,
|
||||
SamplerInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
Program *CreateProgramWithSource(Context *contextPacked,
|
||||
cl_uint count,
|
||||
const char **strings,
|
||||
const size_t *lengths,
|
||||
cl_int *errcode_ret);
|
||||
Program *CreateProgramWithBinary(Context *contextPacked,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const size_t *lengths,
|
||||
const unsigned char **binaries,
|
||||
cl_int *binary_status,
|
||||
cl_int *errcode_ret);
|
||||
Program *CreateProgramWithBuiltInKernels(Context *contextPacked,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const char *kernel_names,
|
||||
cl_int *errcode_ret);
|
||||
Program *CreateProgramWithIL(Context *contextPacked,
|
||||
const void *il,
|
||||
size_t length,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainProgram(Program *programPacked);
|
||||
cl_int ReleaseProgram(Program *programPacked);
|
||||
cl_int BuildProgram(Program *programPacked,
|
||||
cl_program CreateProgramWithSource(cl_context context,
|
||||
cl_uint count,
|
||||
const char **strings,
|
||||
const size_t *lengths,
|
||||
cl_int *errcode_ret);
|
||||
cl_program CreateProgramWithBinary(cl_context context,
|
||||
cl_uint num_devices,
|
||||
const cl_device_id *device_list,
|
||||
const size_t *lengths,
|
||||
const unsigned char **binaries,
|
||||
cl_int *binary_status,
|
||||
cl_int *errcode_ret);
|
||||
cl_program CreateProgramWithBuiltInKernels(cl_context context,
|
||||
cl_uint num_devices,
|
||||
const cl_device_id *device_list,
|
||||
const char *kernel_names,
|
||||
cl_int *errcode_ret);
|
||||
cl_program CreateProgramWithIL(cl_context context,
|
||||
const void *il,
|
||||
size_t length,
|
||||
cl_int *errcode_ret);
|
||||
cl_int RetainProgram(cl_program program);
|
||||
cl_int ReleaseProgram(cl_program program);
|
||||
cl_int BuildProgram(cl_program program,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
void *user_data);
|
||||
cl_int CompileProgram(Program *programPacked,
|
||||
cl_int CompileProgram(cl_program program,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
cl_uint num_input_headers,
|
||||
Program *const *input_headersPacked,
|
||||
const cl_program *input_headers,
|
||||
const char **header_include_names,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
void *user_data);
|
||||
Program *LinkProgram(Context *contextPacked,
|
||||
cl_uint num_devices,
|
||||
Device *const *device_listPacked,
|
||||
const char *options,
|
||||
cl_uint num_input_programs,
|
||||
Program *const *input_programsPacked,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int SetProgramReleaseCallback(Program *programPacked,
|
||||
cl_program LinkProgram(cl_context context,
|
||||
cl_uint num_devices,
|
||||
const cl_device_id *device_list,
|
||||
const char *options,
|
||||
cl_uint num_input_programs,
|
||||
const cl_program *input_programs,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
void *user_data,
|
||||
cl_int *errcode_ret);
|
||||
cl_int SetProgramReleaseCallback(cl_program program,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
|
||||
void *user_data);
|
||||
cl_int SetProgramSpecializationConstant(Program *programPacked,
|
||||
cl_int SetProgramSpecializationConstant(cl_program program,
|
||||
cl_uint spec_id,
|
||||
size_t spec_size,
|
||||
const void *spec_value);
|
||||
cl_int UnloadPlatformCompiler(Platform *platformPacked);
|
||||
cl_int GetProgramInfo(Program *programPacked,
|
||||
cl_int UnloadPlatformCompiler(cl_platform_id platform);
|
||||
cl_int GetProgramInfo(cl_program program,
|
||||
ProgramInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetProgramBuildInfo(Program *programPacked,
|
||||
Device *devicePacked,
|
||||
cl_int GetProgramBuildInfo(cl_program program,
|
||||
cl_device_id device,
|
||||
ProgramBuildInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
Kernel *CreateKernel(Program *programPacked, const char *kernel_name, cl_int *errcode_ret);
|
||||
cl_int CreateKernelsInProgram(Program *programPacked,
|
||||
cl_kernel CreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret);
|
||||
cl_int CreateKernelsInProgram(cl_program program,
|
||||
cl_uint num_kernels,
|
||||
Kernel **kernelsPacked,
|
||||
cl_kernel *kernels,
|
||||
cl_uint *num_kernels_ret);
|
||||
Kernel *CloneKernel(Kernel *source_kernelPacked, cl_int *errcode_ret);
|
||||
cl_int RetainKernel(Kernel *kernelPacked);
|
||||
cl_int ReleaseKernel(Kernel *kernelPacked);
|
||||
cl_int SetKernelArg(Kernel *kernelPacked,
|
||||
cl_uint arg_index,
|
||||
size_t arg_size,
|
||||
const void *arg_value);
|
||||
cl_int SetKernelArgSVMPointer(Kernel *kernelPacked, cl_uint arg_index, const void *arg_value);
|
||||
cl_int SetKernelExecInfo(Kernel *kernelPacked,
|
||||
cl_kernel CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret);
|
||||
cl_int RetainKernel(cl_kernel kernel);
|
||||
cl_int ReleaseKernel(cl_kernel kernel);
|
||||
cl_int SetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value);
|
||||
cl_int SetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value);
|
||||
cl_int SetKernelExecInfo(cl_kernel kernel,
|
||||
KernelExecInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
const void *param_value);
|
||||
cl_int GetKernelInfo(Kernel *kernelPacked,
|
||||
cl_int GetKernelInfo(cl_kernel kernel,
|
||||
KernelInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetKernelArgInfo(Kernel *kernelPacked,
|
||||
cl_int GetKernelArgInfo(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
KernelArgInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetKernelWorkGroupInfo(Kernel *kernelPacked,
|
||||
Device *devicePacked,
|
||||
cl_int GetKernelWorkGroupInfo(cl_kernel kernel,
|
||||
cl_device_id device,
|
||||
KernelWorkGroupInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int GetKernelSubGroupInfo(Kernel *kernelPacked,
|
||||
Device *devicePacked,
|
||||
cl_int GetKernelSubGroupInfo(cl_kernel kernel,
|
||||
cl_device_id device,
|
||||
KernelSubGroupInfo param_namePacked,
|
||||
size_t input_value_size,
|
||||
const void *input_value,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int WaitForEvents(cl_uint num_events, Event *const *event_listPacked);
|
||||
cl_int GetEventInfo(Event *eventPacked,
|
||||
cl_int WaitForEvents(cl_uint num_events, const cl_event *event_list);
|
||||
cl_int GetEventInfo(cl_event event,
|
||||
EventInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
Event *CreateUserEvent(Context *contextPacked, cl_int *errcode_ret);
|
||||
cl_int RetainEvent(Event *eventPacked);
|
||||
cl_int ReleaseEvent(Event *eventPacked);
|
||||
cl_int SetUserEventStatus(Event *eventPacked, cl_int execution_status);
|
||||
cl_int SetEventCallback(Event *eventPacked,
|
||||
cl_event CreateUserEvent(cl_context context, cl_int *errcode_ret);
|
||||
cl_int RetainEvent(cl_event event);
|
||||
cl_int ReleaseEvent(cl_event event);
|
||||
cl_int SetUserEventStatus(cl_event event, cl_int execution_status);
|
||||
cl_int SetEventCallback(cl_event event,
|
||||
cl_int command_exec_callback_type,
|
||||
void(CL_CALLBACK *pfn_notify)(cl_event event,
|
||||
cl_int event_command_status,
|
||||
void *user_data),
|
||||
void *user_data);
|
||||
cl_int GetEventProfilingInfo(Event *eventPacked,
|
||||
cl_int GetEventProfilingInfo(cl_event event,
|
||||
ProfilingInfo param_namePacked,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
cl_int Flush(CommandQueue *command_queuePacked);
|
||||
cl_int Finish(CommandQueue *command_queuePacked);
|
||||
cl_int EnqueueReadBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
cl_int Flush(cl_command_queue command_queue);
|
||||
cl_int Finish(cl_command_queue command_queue);
|
||||
cl_int EnqueueReadBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_read,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueReadBufferRect(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueReadBufferRect(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_read,
|
||||
const size_t *buffer_origin,
|
||||
const size_t *host_origin,
|
||||
|
@ -311,19 +306,19 @@ cl_int EnqueueReadBufferRect(CommandQueue *command_queuePacked,
|
|||
size_t host_slice_pitch,
|
||||
void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueWriteBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueWriteBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_write,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueWriteBufferRect(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueWriteBufferRect(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_write,
|
||||
const size_t *buffer_origin,
|
||||
const size_t *host_origin,
|
||||
|
@ -334,29 +329,29 @@ cl_int EnqueueWriteBufferRect(CommandQueue *command_queuePacked,
|
|||
size_t host_slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueFillBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueFillBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
const void *pattern,
|
||||
size_t pattern_size,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueCopyBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *src_bufferPacked,
|
||||
Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueCopyBuffer(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_buffer,
|
||||
size_t src_offset,
|
||||
size_t dst_offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueCopyBufferRect(CommandQueue *command_queuePacked,
|
||||
Memory *src_bufferPacked,
|
||||
Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueCopyBufferRect(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_buffer,
|
||||
const size_t *src_origin,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
|
@ -365,10 +360,10 @@ cl_int EnqueueCopyBufferRect(CommandQueue *command_queuePacked,
|
|||
size_t dst_row_pitch,
|
||||
size_t dst_slice_pitch,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueReadImage(CommandQueue *command_queuePacked,
|
||||
Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueReadImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_read,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
|
@ -376,10 +371,10 @@ cl_int EnqueueReadImage(CommandQueue *command_queuePacked,
|
|||
size_t slice_pitch,
|
||||
void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueWriteImage(CommandQueue *command_queuePacked,
|
||||
Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueWriteImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_write,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
|
@ -387,55 +382,55 @@ cl_int EnqueueWriteImage(CommandQueue *command_queuePacked,
|
|||
size_t input_slice_pitch,
|
||||
const void *ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueFillImage(CommandQueue *command_queuePacked,
|
||||
Memory *imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueFillImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
const void *fill_color,
|
||||
const size_t *origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueCopyImage(CommandQueue *command_queuePacked,
|
||||
Memory *src_imagePacked,
|
||||
Memory *dst_imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueCopyImage(cl_command_queue command_queue,
|
||||
cl_mem src_image,
|
||||
cl_mem dst_image,
|
||||
const size_t *src_origin,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueCopyImageToBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *src_imagePacked,
|
||||
Memory *dst_bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueCopyImageToBuffer(cl_command_queue command_queue,
|
||||
cl_mem src_image,
|
||||
cl_mem dst_buffer,
|
||||
const size_t *src_origin,
|
||||
const size_t *region,
|
||||
size_t dst_offset,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueCopyBufferToImage(CommandQueue *command_queuePacked,
|
||||
Memory *src_bufferPacked,
|
||||
Memory *dst_imagePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueCopyBufferToImage(cl_command_queue command_queue,
|
||||
cl_mem src_buffer,
|
||||
cl_mem dst_image,
|
||||
size_t src_offset,
|
||||
const size_t *dst_origin,
|
||||
const size_t *region,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
void *EnqueueMapBuffer(CommandQueue *command_queuePacked,
|
||||
Memory *bufferPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
void *EnqueueMapBuffer(cl_command_queue command_queue,
|
||||
cl_mem buffer,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags map_flags,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event,
|
||||
cl_int *errcode_ret);
|
||||
void *EnqueueMapImage(CommandQueue *command_queuePacked,
|
||||
Memory *imagePacked,
|
||||
void *EnqueueMapImage(cl_command_queue command_queue,
|
||||
cl_mem image,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags map_flags,
|
||||
const size_t *origin,
|
||||
|
@ -443,50 +438,50 @@ void *EnqueueMapImage(CommandQueue *command_queuePacked,
|
|||
size_t *image_row_pitch,
|
||||
size_t *image_slice_pitch,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event,
|
||||
cl_int *errcode_ret);
|
||||
cl_int EnqueueUnmapMemObject(CommandQueue *command_queuePacked,
|
||||
Memory *memobjPacked,
|
||||
cl_int EnqueueUnmapMemObject(cl_command_queue command_queue,
|
||||
cl_mem memobj,
|
||||
void *mapped_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueMigrateMemObjects(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueMigrateMemObjects(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
Memory *const *mem_objectsPacked,
|
||||
const cl_mem *mem_objects,
|
||||
cl_mem_migration_flags flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueNDRangeKernel(CommandQueue *command_queuePacked,
|
||||
Kernel *kernelPacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueNDRangeKernel(cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint work_dim,
|
||||
const size_t *global_work_offset,
|
||||
const size_t *global_work_size,
|
||||
const size_t *local_work_size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueNativeKernel(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueNativeKernel(cl_command_queue command_queue,
|
||||
void(CL_CALLBACK *user_func)(void *),
|
||||
void *args,
|
||||
size_t cb_args,
|
||||
cl_uint num_mem_objects,
|
||||
Memory *const *mem_listPacked,
|
||||
const cl_mem *mem_list,
|
||||
const void **args_mem_loc,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueMarkerWithWaitList(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueMarkerWithWaitList(cl_command_queue command_queue,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueBarrierWithWaitList(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueBarrierWithWaitList(cl_command_queue command_queue,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMFree(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMFree(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void *svm_pointers[],
|
||||
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
|
||||
|
@ -495,88 +490,88 @@ cl_int EnqueueSVMFree(CommandQueue *command_queuePacked,
|
|||
void *user_data),
|
||||
void *user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMMemcpy(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMMemcpy(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
void *dst_ptr,
|
||||
const void *src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMMemFill(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMMemFill(cl_command_queue command_queue,
|
||||
void *svm_ptr,
|
||||
const void *pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMMap(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMMap(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
void *svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMUnmap(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMUnmap(cl_command_queue command_queue,
|
||||
void *svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
cl_int EnqueueSVMMigrateMem(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
cl_int EnqueueSVMMigrateMem(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
const void **svm_pointers,
|
||||
const size_t *sizes,
|
||||
cl_mem_migration_flags flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
void *GetExtensionFunctionAddressForPlatform(Platform *platformPacked, const char *func_name);
|
||||
cl_int SetCommandQueueProperty(CommandQueue *command_queuePacked,
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
void *GetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *func_name);
|
||||
cl_int SetCommandQueueProperty(cl_command_queue command_queue,
|
||||
cl_command_queue_properties properties,
|
||||
cl_bool enable,
|
||||
cl_command_queue_properties *old_properties);
|
||||
Memory *CreateImage2D(Context *contextPacked,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
size_t image_row_pitch,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
Memory *CreateImage3D(Context *contextPacked,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
size_t image_depth,
|
||||
size_t image_row_pitch,
|
||||
size_t image_slice_pitch,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_int EnqueueMarker(CommandQueue *command_queuePacked, Event **eventPacked);
|
||||
cl_int EnqueueWaitForEvents(CommandQueue *command_queuePacked,
|
||||
cl_mem CreateImage2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
size_t image_row_pitch,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_mem CreateImage3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_image_format *image_format,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
size_t image_depth,
|
||||
size_t image_row_pitch,
|
||||
size_t image_slice_pitch,
|
||||
void *host_ptr,
|
||||
cl_int *errcode_ret);
|
||||
cl_int EnqueueMarker(cl_command_queue command_queue, cl_event *event);
|
||||
cl_int EnqueueWaitForEvents(cl_command_queue command_queue,
|
||||
cl_uint num_events,
|
||||
Event *const *event_listPacked);
|
||||
cl_int EnqueueBarrier(CommandQueue *command_queuePacked);
|
||||
const cl_event *event_list);
|
||||
cl_int EnqueueBarrier(cl_command_queue command_queue);
|
||||
cl_int UnloadCompiler();
|
||||
void *GetExtensionFunctionAddress(const char *func_name);
|
||||
CommandQueue *CreateCommandQueue(Context *contextPacked,
|
||||
Device *devicePacked,
|
||||
cl_command_queue_properties properties,
|
||||
cl_int *errcode_ret);
|
||||
Sampler *CreateSampler(Context *contextPacked,
|
||||
cl_bool normalized_coords,
|
||||
AddressingMode addressing_modePacked,
|
||||
FilterMode filter_modePacked,
|
||||
cl_int *errcode_ret);
|
||||
cl_int EnqueueTask(CommandQueue *command_queuePacked,
|
||||
Kernel *kernelPacked,
|
||||
cl_command_queue CreateCommandQueue(cl_context context,
|
||||
cl_device_id device,
|
||||
cl_command_queue_properties properties,
|
||||
cl_int *errcode_ret);
|
||||
cl_sampler CreateSampler(cl_context context,
|
||||
cl_bool normalized_coords,
|
||||
AddressingMode addressing_modePacked,
|
||||
FilterMode filter_modePacked,
|
||||
cl_int *errcode_ret);
|
||||
cl_int EnqueueTask(cl_command_queue command_queue,
|
||||
cl_kernel kernel,
|
||||
cl_uint num_events_in_wait_list,
|
||||
Event *const *event_wait_listPacked,
|
||||
Event **eventPacked);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
} // namespace cl
|
||||
#endif // LIBGLESV2_CL_STUBS_AUTOGEN_H_
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,52 @@
|
|||
//
|
||||
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// entry_points_cl_utils.cpp: These helpers are used in CL entry point routines.
|
||||
|
||||
#include "libGLESv2/entry_points_cl_utils.h"
|
||||
|
||||
#include "libGLESv2/cl_dispatch_table.h"
|
||||
|
||||
#include "libANGLE/CLPlatform.h"
|
||||
|
||||
#ifdef ANGLE_ENABLE_CL_PASSTHROUGH
|
||||
# include "libANGLE/renderer/cl/CLPlatformCL.h"
|
||||
#endif
|
||||
#ifdef ANGLE_ENABLE_VULKAN
|
||||
# include "libANGLE/renderer/vulkan/CLPlatformVk.h"
|
||||
#endif
|
||||
|
||||
namespace cl
|
||||
{
|
||||
|
||||
void InitBackEnds(bool isIcd)
|
||||
{
|
||||
static bool initialized = false;
|
||||
if (initialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
#ifdef ANGLE_ENABLE_CL_PASSTHROUGH
|
||||
rx::CLPlatformImpl::InitList initListCL = rx::CLPlatformCL::GetPlatforms(isIcd);
|
||||
while (!initListCL.empty())
|
||||
{
|
||||
Platform::CreatePlatform(gCLIcdDispatchTable, initListCL.front());
|
||||
initListCL.pop_front();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ANGLE_ENABLE_VULKAN
|
||||
rx::CLPlatformImpl::InitList initListVk = rx::CLPlatformVk::GetPlatforms();
|
||||
while (!initListVk.empty())
|
||||
{
|
||||
Platform::CreatePlatform(gCLIcdDispatchTable, initListVk.front());
|
||||
initListVk.pop_front();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace cl
|
|
@ -3,17 +3,16 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// entry_points_cl_utils.h:
|
||||
// These helpers are used in CL entry point routines.
|
||||
// entry_points_cl_utils.h: These helpers are used in CL entry point routines.
|
||||
|
||||
#ifndef LIBGLESV2_ENTRY_POINTS_CL_UTILS_H_
|
||||
#define LIBGLESV2_ENTRY_POINTS_CL_UTILS_H_
|
||||
|
||||
#include "libANGLE/Debug.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include "common/PackedCLEnums_autogen.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <type_traits>
|
||||
|
||||
#if defined(ANGLE_ENABLE_DEBUG_TRACE)
|
||||
# define CL_EVENT(entryPoint, ...) \
|
||||
|
@ -26,22 +25,11 @@
|
|||
namespace cl
|
||||
{
|
||||
|
||||
// First case: handling packed enums.
|
||||
template <typename PackedT, typename FromT>
|
||||
typename std::enable_if_t<std::is_enum<PackedT>::value, PackedT> PackParam(FromT from)
|
||||
{
|
||||
return FromCLenum<PackedT>(from);
|
||||
}
|
||||
// Handling only packed enums
|
||||
template <typename Enum>
|
||||
constexpr auto PackParam = FromCLenum<Enum>;
|
||||
|
||||
// Cast CL object types to ANGLE CL object types
|
||||
template <typename PackedT, typename FromT>
|
||||
inline std::enable_if_t<
|
||||
std::is_base_of<cl::Object, std::remove_pointer_t<std::remove_pointer_t<PackedT>>>::value,
|
||||
PackedT>
|
||||
PackParam(FromT from)
|
||||
{
|
||||
return reinterpret_cast<PackedT>(from);
|
||||
}
|
||||
void InitBackEnds(bool isIcd);
|
||||
|
||||
} // namespace cl
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче