mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 00:10:24 +08:00
1159 lines
56 KiB
Go
1159 lines
56 KiB
Go
// Code generated by cmd/gen. DO NOT EDIT.
|
|
|
|
/*
|
|
*
|
|
* Copyright (C) 2019-2025 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* @file ze_api.h
|
|
* @version v1.15-r1.15.31
|
|
*
|
|
*/
|
|
|
|
package gozel
|
|
|
|
import (
|
|
"unsafe"
|
|
|
|
"github.com/fumiama/gozel/internal/zecall"
|
|
)
|
|
|
|
// ZeEventPoolFlags (ze_event_pool_flags_t) Supported event pool creation flags
|
|
type ZeEventPoolFlags uint32
|
|
|
|
const (
|
|
ZE_EVENT_POOL_FLAG_HOST_VISIBLE ZeEventPoolFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_POOL_FLAG_HOST_VISIBLE signals and waits are also visible to host
|
|
ZE_EVENT_POOL_FLAG_IPC ZeEventPoolFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_POOL_FLAG_IPC signals and waits may be shared across processes
|
|
ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP Indicates all events in pool will contain kernel timestamps
|
|
ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP Indicates all events in pool will contain kernel timestamps
|
|
|
|
///< synchronized to host time domain; cannot be combined with
|
|
///< ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP
|
|
|
|
ZE_EVENT_POOL_FLAG_FORCE_UINT32 ZeEventPoolFlags = 0x7fffffff // ZE_EVENT_POOL_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeEventPoolDesc (ze_event_pool_desc_t) Event pool descriptor
|
|
type ZeEventPoolDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeEventPoolFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_event_pool_flag_t; default behavior is signals and waits are visible to the entire device and peer devices.
|
|
Count uint32 // Count [in] number of events within the pool; must be greater than 0
|
|
|
|
}
|
|
|
|
// ZeEventPoolCreate Creates a pool of events on the context.
|
|
// /
|
|
// / @details
|
|
// / - The application must only use events within the pool for the
|
|
// / device(s), or their sub-devices, which were provided during creation.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function must be thread-safe.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hContext`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == desc`
|
|
// / + `nullptr == phEventPool`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
// / + `0xf < desc->flags`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SIZE
|
|
// / + `0 == desc->count`
|
|
// / + `(nullptr == phDevices) && (0 < numDevices)`
|
|
func ZeEventPoolCreate(
|
|
hContext ZeContextHandle, // hContext [in] handle of the context object
|
|
desc *ZeEventPoolDesc, // desc [in] pointer to event pool descriptor
|
|
numDevices uint32, // numDevices [in][optional] number of device handles; must be 0 if `nullptr == phDevices`
|
|
phDevices *ZeDeviceHandle, // phDevices [in][optional][range(0, numDevices)] array of device handles which have visibility to the event pool. if nullptr, then event pool is visible to all devices supported by the driver instance.
|
|
phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolCreate", uintptr(hContext), uintptr(unsafe.Pointer(desc)), uintptr(numDevices), uintptr(unsafe.Pointer(phDevices)), uintptr(unsafe.Pointer(phEventPool)))
|
|
}
|
|
|
|
// ZeEventPoolDestroy Deletes an event pool object.
|
|
// /
|
|
// / @details
|
|
// / - The application must destroy all event handles created from the pool
|
|
// / before destroying the pool itself.
|
|
// / - The application must ensure the device is not currently referencing
|
|
// / the any event within the pool before it is deleted.
|
|
// / - The implementation of this function may immediately free all Host and
|
|
// / Device allocations associated with this event pool.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same event pool handle.
|
|
// / - The implementation of this function must be thread-safe.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
|
|
func ZeEventPoolDestroy(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object to destroy
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolDestroy", uintptr(hEventPool))
|
|
}
|
|
|
|
// ZeEventScopeFlags (ze_event_scope_flags_t) Supported event scope flags
|
|
type ZeEventScopeFlags uint32
|
|
|
|
const (
|
|
ZE_EVENT_SCOPE_FLAG_SUBDEVICE ZeEventScopeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_SCOPE_FLAG_SUBDEVICE cache hierarchies are flushed or invalidated sufficient for local
|
|
|
|
///< sub-device access
|
|
|
|
ZE_EVENT_SCOPE_FLAG_DEVICE ZeEventScopeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_SCOPE_FLAG_DEVICE cache hierarchies are flushed or invalidated sufficient for global
|
|
|
|
///< device access and peer device access
|
|
|
|
ZE_EVENT_SCOPE_FLAG_HOST ZeEventScopeFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_SCOPE_FLAG_HOST cache hierarchies are flushed or invalidated sufficient for device and
|
|
|
|
///< host access
|
|
|
|
ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 ZeEventScopeFlags = 0x7fffffff // ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeEventCounterBasedFlags (ze_event_counter_based_flags_t) Supported flags for defining counter based event
|
|
type ZeEventCounterBasedFlags uint32
|
|
|
|
const (
|
|
ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE Counter-based event is used for immediate command lists (default)
|
|
ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE Counter-based event is used for non-immediate command lists
|
|
ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE ZeEventCounterBasedFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE Signals and waits are also visible to host
|
|
ZE_EVENT_COUNTER_BASED_FLAG_IPC ZeEventCounterBasedFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EVENT_COUNTER_BASED_FLAG_IPC Event can be shared across processes for waiting
|
|
ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP Event contains timestamps populated in the device time domain.
|
|
|
|
///< Implementation of this can be vendor specific, but typically pulled
|
|
///< from timers on the offload device and not the host.
|
|
///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP
|
|
|
|
ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP Indicates that event will contain timestamps converted to the host
|
|
|
|
///< time domain
|
|
///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP
|
|
///< It is recommended to use this flag for most users that want to
|
|
///< correlate timestamps from the host and device into a single timeline.
|
|
///< For host timestamps see ::zeDeviceGetGlobalTimestamps.
|
|
|
|
ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 ZeEventCounterBasedFlags = 0x7fffffff // ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_COUNTER_BASED_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeEventSyncModeFlags (ze_event_sync_mode_flags_t) Supported event sync mode flags
|
|
type ZeEventSyncModeFlags uint32
|
|
|
|
const (
|
|
ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT ZeEventSyncModeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT Low power host synchronization mode, for better CPU utilization
|
|
ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT ZeEventSyncModeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT Generate interrupt when Event is signalled on Device. It may be used
|
|
|
|
///< to optimize low power CPU synchronization
|
|
|
|
ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT ZeEventSyncModeFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT Host synchronization APIs wait for external interrupt id. Can be used
|
|
|
|
///< only for Counter Based Events
|
|
|
|
ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 ZeEventSyncModeFlags = 0x7fffffff // ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SYNC_MODE_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeEventSyncModeDesc (ze_event_sync_mode_desc_t) Event sync mode descriptor
|
|
type ZeEventSyncModeDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Syncmodeflags ZeEventSyncModeFlags // Syncmodeflags [in] valid combination of ::ze_event_sync_mode_flag_t
|
|
Externalinterruptid uint32 // Externalinterruptid [in] External interrupt id. Used only when ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set
|
|
|
|
}
|
|
|
|
// ZeEventDesc (ze_event_desc_t) Event descriptor
|
|
type ZeEventDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Index uint32 // Index [in] index of the event within the pool; must be less than the count specified during pool creation
|
|
Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed.
|
|
Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated.
|
|
|
|
}
|
|
|
|
// ZeEventCounterBasedDesc (ze_event_counter_based_desc_t) Counter Based Event descriptor
|
|
type ZeEventCounterBasedDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Flags ZeEventCounterBasedFlags // Flags [in] counter based event flags. Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t
|
|
Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed.
|
|
Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated.
|
|
|
|
}
|
|
|
|
// ZeEventCounterBasedExternalSyncAllocationDesc (ze_event_counter_based_external_sync_allocation_desc_t) Counter Based Event external sync allocation descriptor. Passed as
|
|
// / pNext to ::ze_event_counter_based_desc_t
|
|
type ZeEventCounterBasedExternalSyncAllocationDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Deviceaddress *uint64 // Deviceaddress [in] device address for external synchronization allocation
|
|
Hostaddress *uint64 // Hostaddress [in] host address for external synchronization allocation
|
|
Completionvalue uint64 // Completionvalue [in] completion value for external synchronization allocation
|
|
|
|
}
|
|
|
|
// ZeEventCounterBasedExternalAggregateStorageDesc (ze_event_counter_based_external_aggregate_storage_desc_t) Counter Based Event external aggregate storage. Passed as pNext to
|
|
// / ::ze_event_counter_based_desc_t
|
|
type ZeEventCounterBasedExternalAggregateStorageDesc struct {
|
|
Stype ZeStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Deviceaddress *uint64 // Deviceaddress [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory
|
|
Incrementvalue uint64 // Incrementvalue [in] value which would by atomically added upon each completion
|
|
Completionvalue uint64 // Completionvalue [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed
|
|
|
|
}
|
|
|
|
// ZeEventCreate Creates an event from the pool.
|
|
// /
|
|
// / @details
|
|
// / - An event is used to communicate fine-grain host-to-device,
|
|
// / device-to-host or device-to-device dependencies have completed.
|
|
// / - The application must ensure the location in the pool is not being used
|
|
// / by another event.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same event pool handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - **clCreateUserEvent**
|
|
// / - vkCreateEvent
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == desc`
|
|
// / + `nullptr == phEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
// / + `0x7 < desc->signal`
|
|
// / + `0x7 < desc->wait`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
func ZeEventCreate(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool
|
|
desc *ZeEventDesc, // desc [in] pointer to event descriptor
|
|
phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCreate", uintptr(hEventPool), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phEvent)))
|
|
}
|
|
|
|
// ZeEventCounterBasedCreate Creates Counter Based Event
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hContext`
|
|
// / + `nullptr == hDevice`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == desc`
|
|
// / + `nullptr == phEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
// / + `0x3f < desc->flags`
|
|
// / + `0x7 < desc->signal`
|
|
// / + `0x7 < desc->wait`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
func ZeEventCounterBasedCreate(
|
|
hContext ZeContextHandle, // hContext [in] handle of the context object
|
|
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
|
|
desc *ZeEventCounterBasedDesc, // desc [in] pointer to counter based event descriptor
|
|
phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCounterBasedCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phEvent)))
|
|
}
|
|
|
|
// ZeEventDestroy Deletes an event object.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the device is not currently referencing
|
|
// / the event before it is deleted.
|
|
// / - The implementation of this function may immediately free all Host and
|
|
// / Device allocations associated with this event.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same event handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - **clReleaseEvent**
|
|
// / - vkDestroyEvent
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
|
|
func ZeEventDestroy(
|
|
hEvent ZeEventHandle, // hEvent [in][release] handle of event object to destroy
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventDestroy", uintptr(hEvent))
|
|
}
|
|
|
|
// ZeEventPoolGetIpcHandle Gets an IPC event pool handle for the specified event handle that can
|
|
// / be shared with another process.
|
|
// /
|
|
// / @details
|
|
// / - Event pool must have been created with ::ZE_EVENT_POOL_FLAG_IPC.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phIpc`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeEventPoolGetIpcHandle(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in] handle of event pool object
|
|
phIpc *ZeIpcEventPoolHandle, // phIpc [out] Returned IPC event handle
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolGetIpcHandle", uintptr(hEventPool), uintptr(unsafe.Pointer(phIpc)))
|
|
}
|
|
|
|
// ZeEventPoolPutIpcHandle Returns an IPC event pool handle to the driver
|
|
// /
|
|
// / @details
|
|
// / - This call must be used for IPC handles previously obtained with
|
|
// / ::zeEventPoolGetIpcHandle.
|
|
// / - Upon call, driver may release any underlying resources associated with
|
|
// / the IPC handle.
|
|
// / For instance, it may close the file descriptor contained in the IPC
|
|
// / handle, if such type of handle is being used by the driver.
|
|
// / - This call does not destroy the original event pool for which the IPC
|
|
// / handle was created.
|
|
// / - This function may **not** be called from simultaneous threads with the
|
|
// / same IPC handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hContext`
|
|
func ZeEventPoolPutIpcHandle(
|
|
hContext ZeContextHandle, // hContext [in] handle of the context object associated with the IPC event pool handle
|
|
hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value)
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolPutIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc)))
|
|
}
|
|
|
|
// ZeEventPoolOpenIpcHandle Opens an IPC event pool handle to retrieve an event pool handle from
|
|
// / another process.
|
|
// /
|
|
// / @details
|
|
// / - Multiple calls to this function with the same IPC handle will return
|
|
// / unique event pool handles.
|
|
// / - The event handle in this process should not be freed with
|
|
// / ::zeEventPoolDestroy, but rather with ::zeEventPoolCloseIpcHandle.
|
|
// / - If the original event pool has been created for a device containing a
|
|
// / number of sub-devices, then the event pool
|
|
// / returned by this call may be used on a device containing the same
|
|
// / number of sub-devices, or on any of
|
|
// / those sub-devices.
|
|
// / - However, if the original event pool has been created for a sub-device,
|
|
// / then the event pool returned by this call
|
|
// / cannot be used on a device containing any number of sub-devices, and
|
|
// / must be used only in a sub-device. This ensures
|
|
// / functional correctness for any implementation or optimizations the
|
|
// / underlying Level Zero driver may do on
|
|
// / event pools and events.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hContext`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phEventPool`
|
|
func ZeEventPoolOpenIpcHandle(
|
|
hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event pool handle
|
|
hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value)
|
|
phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolOpenIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc)), uintptr(unsafe.Pointer(phEventPool)))
|
|
}
|
|
|
|
// ZeEventPoolCloseIpcHandle Closes an IPC event handle in the current process.
|
|
// /
|
|
// / @details
|
|
// / - Closes an IPC event handle by destroying events that were opened in
|
|
// / this process using ::zeEventPoolOpenIpcHandle.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same event pool handle.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
func ZeEventPoolCloseIpcHandle(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolCloseIpcHandle", uintptr(hEventPool))
|
|
}
|
|
|
|
// ZeEventCounterBasedGetIpcHandle Gets an IPC counter based event handle that can be shared with another
|
|
// / process.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phIpc`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
func ZeEventCounterBasedGetIpcHandle(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of event object
|
|
phIpc *ZeIpcEventCounterBasedHandle, // phIpc [out] Returned IPC event handle
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCounterBasedGetIpcHandle", uintptr(hEvent), uintptr(unsafe.Pointer(phIpc)))
|
|
}
|
|
|
|
// ZeEventCounterBasedOpenIpcHandle Opens an IPC event handle to retrieve from another process.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hContext`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
func ZeEventCounterBasedOpenIpcHandle(
|
|
hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event handle
|
|
hIpc *ZeIpcEventCounterBasedHandle, // hIpc [in] IPC event handle (gozel hack: converted to a hidden pointer from a struct value)
|
|
phEvent *ZeEventHandle, // phEvent [out] pointer handle of event object created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCounterBasedOpenIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc)), uintptr(unsafe.Pointer(phEvent)))
|
|
}
|
|
|
|
// ZeEventCounterBasedCloseIpcHandle Closes an IPC event handle in the current process.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeEventCounterBasedCloseIpcHandle(
|
|
hEvent ZeEventHandle, // hEvent [in][release] handle of event object
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCounterBasedCloseIpcHandle", uintptr(hEvent))
|
|
}
|
|
|
|
// ZeEventCounterBasedGetDeviceAddress Returns Counter Based Event completion value (counter) and its device
|
|
// / address
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == completionValue`
|
|
// / + `nullptr == deviceAddress`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
func ZeEventCounterBasedGetDeviceAddress(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of event object
|
|
completionValue *uint64, // completionValue [in][out] completion value
|
|
deviceAddress *uint64, // deviceAddress [in][out] counter device address
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventCounterBasedGetDeviceAddress", uintptr(hEvent), uintptr(unsafe.Pointer(completionValue)), uintptr(unsafe.Pointer(deviceAddress)))
|
|
}
|
|
|
|
// ZeCommandListAppendSignalEvent Appends a signal of the event from the device into a command list.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the events are accessible by the device on
|
|
// / which the command list was created.
|
|
// / - The duration of an event created from an event pool that was created
|
|
// / using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or
|
|
// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined.
|
|
// / However, for consistency and orthogonality the event will report
|
|
// / correctly as signaled when used by other event API functionality.
|
|
// / - The application must ensure the command list and events were created
|
|
// / on the same context.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same command list handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - **clSetUserEventStatus**
|
|
// / - vkCmdSetEvent
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hCommandList`
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeCommandListAppendSignalEvent(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListAppendSignalEvent", uintptr(hCommandList), uintptr(hEvent))
|
|
}
|
|
|
|
// ZeCommandListAppendWaitOnEvents Appends wait on event(s) on the device into a command list.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the events are accessible by the device on
|
|
// / which the command list was created.
|
|
// / - The application must ensure the command list and events were created
|
|
// / on the same context.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same command list handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hCommandList`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phEvents`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeCommandListAppendWaitOnEvents(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
numEvents uint32, // numEvents [in] number of events to wait on before continuing
|
|
phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of the events to wait on before continuing
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListAppendWaitOnEvents", uintptr(hCommandList), uintptr(numEvents), uintptr(unsafe.Pointer(phEvents)))
|
|
}
|
|
|
|
// ZeEventHostSignal Signals a event from host.
|
|
// /
|
|
// / @details
|
|
// / - The duration of an event created from an event pool that was created
|
|
// / using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or
|
|
// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined.
|
|
// / However, for consistency and orthogonality the event will report
|
|
// / correctly as signaled when used by other event API functionality.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clSetUserEventStatus
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeEventHostSignal(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventHostSignal", uintptr(hEvent))
|
|
}
|
|
|
|
// ZeEventHostSynchronize The current host thread waits on an event to be signaled.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - clWaitForEvents
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
// / - ::ZE_RESULT_NOT_READY
|
|
// / + timeout expired
|
|
func ZeEventHostSynchronize(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then operates exactly like ::zeEventQueryStatus; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventHostSynchronize", uintptr(hEvent), uintptr(timeout))
|
|
}
|
|
|
|
// ZeEventQueryStatus Queries an event object's status on the host.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - **clGetEventInfo**
|
|
// / - vkGetEventStatus
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
// / - ::ZE_RESULT_NOT_READY
|
|
// / + not signaled
|
|
func ZeEventQueryStatus(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventQueryStatus", uintptr(hEvent))
|
|
}
|
|
|
|
// ZeCommandListAppendEventReset Appends a reset of an event back to not signaled state into a command
|
|
// / list.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the events are accessible by the device on
|
|
// / which the command list was created.
|
|
// / - The application must ensure the command list and events were created
|
|
// / on the same context.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same command list handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - vkResetEvent
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hCommandList`
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeCommandListAppendEventReset(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListAppendEventReset", uintptr(hCommandList), uintptr(hEvent))
|
|
}
|
|
|
|
// ZeEventHostReset The current host thread resets an event back to not signaled state.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @remarks
|
|
// / _Analogues_
|
|
// / - vkResetEvent
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
func ZeEventHostReset(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventHostReset", uintptr(hEvent))
|
|
}
|
|
|
|
// ZeKernelTimestampData (ze_kernel_timestamp_data_t) Kernel timestamp clock data
|
|
// /
|
|
// / @details
|
|
// / - The timestamp frequency can be queried from the `timerResolution`
|
|
// / member of ::ze_device_properties_t.
|
|
// / - The number of valid bits in the timestamp value can be queried from
|
|
// / the `kernelTimestampValidBits` member of ::ze_device_properties_t.
|
|
type ZeKernelTimestampData struct {
|
|
Kernelstart uint64 // Kernelstart [out] device clock at start of kernel execution
|
|
Kernelend uint64 // Kernelend [out] device clock at end of kernel execution
|
|
|
|
}
|
|
|
|
// ZeKernelTimestampResult (ze_kernel_timestamp_result_t) Kernel timestamp result
|
|
type ZeKernelTimestampResult struct {
|
|
Global ZeKernelTimestampData // Global [out] wall-clock data
|
|
Context ZeKernelTimestampData // Context [out] context-active data; only includes clocks while device context was actively executing.
|
|
|
|
}
|
|
|
|
// ZeEventQueryKernelTimestamp Queries an event's timestamp value on the host.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the event was created from an event pool
|
|
// / that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or
|
|
// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag.
|
|
// / - The destination memory will be unmodified if the event has not been
|
|
// / signaled.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == dstptr`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
// / - ::ZE_RESULT_NOT_READY
|
|
// / + not signaled
|
|
func ZeEventQueryKernelTimestamp(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
dstptr *ZeKernelTimestampResult, // dstptr [in,out] pointer to memory for where timestamp result will be written.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventQueryKernelTimestamp", uintptr(hEvent), uintptr(unsafe.Pointer(dstptr)))
|
|
}
|
|
|
|
// ZeCommandListAppendQueryKernelTimestamps Appends a query of an events' timestamp value(s) into a command list.
|
|
// /
|
|
// / @details
|
|
// / - The application must ensure the events are accessible by the device on
|
|
// / which the command list was created.
|
|
// / - The application must ensure the events were created from an event pool
|
|
// / that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag.
|
|
// / - The application must ensure the memory pointed to by both dstptr and
|
|
// / pOffsets is accessible by the device on which the command list was
|
|
// / created.
|
|
// / - The value(s) written to the destination buffer are undefined if any
|
|
// / timestamp event has not been signaled.
|
|
// / - If pOffsets is nullptr, then multiple results will be appended
|
|
// / sequentially into memory in the same order as phEvents.
|
|
// / - The application must ensure the command list and events were created,
|
|
// / and the memory was allocated, on the same context.
|
|
// / - The application must **not** call this function from simultaneous
|
|
// / threads with the same command list handle.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hCommandList`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phEvents`
|
|
// / + `nullptr == dstptr`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
|
// / - ::ZE_RESULT_ERROR_INVALID_SIZE
|
|
// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
|
|
func ZeCommandListAppendQueryKernelTimestamps(
|
|
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
|
|
numEvents uint32, // numEvents [in] the number of timestamp events to query
|
|
phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of timestamp events to query
|
|
dstptr unsafe.Pointer, // dstptr [in,out] pointer to memory where ::ze_kernel_timestamp_result_t will be written; must be size-aligned.
|
|
pOffsets *uintptr, // pOffsets [in][optional][range(0, numEvents)] offset, in bytes, to write results; address must be 4byte-aligned and offsets must be size-aligned.
|
|
hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion
|
|
numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing query; must be 0 if `nullptr == phWaitEvents`
|
|
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing query
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeCommandListAppendQueryKernelTimestamps", uintptr(hCommandList), uintptr(numEvents), uintptr(unsafe.Pointer(phEvents)), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(pOffsets)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
|
|
}
|
|
|
|
// ZeEventGetEventPool Gets the handle of the event pool for the event.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phEventPool`
|
|
func ZeEventGetEventPool(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
phEventPool *ZeEventPoolHandle, // phEventPool [out] handle of the event pool for the event
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventGetEventPool", uintptr(hEvent), uintptr(unsafe.Pointer(phEventPool)))
|
|
}
|
|
|
|
// ZeEventGetSignalScope Gets the signal event scope.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pSignalScope`
|
|
func ZeEventGetSignalScope(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
pSignalScope *ZeEventScopeFlags, // pSignalScope [out] signal event scope. This is the scope of relevant cache hierarchies that are flushed on a signal action before the event is triggered. May be 0 or a valid combination of ::ze_event_scope_flag_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventGetSignalScope", uintptr(hEvent), uintptr(unsafe.Pointer(pSignalScope)))
|
|
}
|
|
|
|
// ZeEventGetWaitScope Gets the wait event scope.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEvent`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pWaitScope`
|
|
func ZeEventGetWaitScope(
|
|
hEvent ZeEventHandle, // hEvent [in] handle of the event
|
|
pWaitScope *ZeEventScopeFlags, // pWaitScope [out] wait event scope. This is the scope of relevant cache hierarchies invalidated on a wait action after the event is complete. May be 0 or a valid combination of ::ze_event_scope_flag_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventGetWaitScope", uintptr(hEvent), uintptr(unsafe.Pointer(pWaitScope)))
|
|
}
|
|
|
|
// ZeEventPoolGetContextHandle Gets the handle of the context on which the event pool was created.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == phContext`
|
|
func ZeEventPoolGetContextHandle(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool
|
|
phContext *ZeContextHandle, // phContext [out] handle of the context on which the event pool was created
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolGetContextHandle", uintptr(hEventPool), uintptr(unsafe.Pointer(phContext)))
|
|
}
|
|
|
|
// ZeEventPoolGetFlags Gets the creation flags used to create the event pool.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// /
|
|
// / @returns
|
|
// / - ::ZE_RESULT_SUCCESS
|
|
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
|
|
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
|
|
// / - ::ZE_RESULT_ERROR_UNKNOWN
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
|
// / + `nullptr == hEventPool`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pFlags`
|
|
func ZeEventPoolGetFlags(
|
|
hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool
|
|
pFlags *ZeEventPoolFlags, // pFlags [out] creation flags used to create the event pool; may be 0 or a valid combination of ::ze_event_pool_flag_t
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventPoolGetFlags", uintptr(hEventPool), uintptr(unsafe.Pointer(pFlags)))
|
|
}
|