1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00
Files
gozel/core_cmdlist.go
github-actions[bot] 32abd8ea7c chore: run go generate
2026-03-26 00:49:32 +08:00

518 lines
25 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"
)
// ZeCommandListFlags (ze_command_list_flags_t) Supported command list creation flags
type ZeCommandListFlags uint32
const (
ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING ZeCommandListFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING driver may reorder commands (e.g., kernels, copies) between barriers
///< and synchronization primitives.
///< using this flag may increase Host overhead of ::zeCommandListClose.
///< therefore, this flag should **not** be set for low-latency usage-models.
ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT ZeCommandListFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT driver may perform additional optimizations that increase execution
///< throughput.
///< using this flag may increase Host overhead of ::zeCommandListClose and ::zeCommandQueueExecuteCommandLists.
///< therefore, this flag should **not** be set for low-latency usage-models.
ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY ZeCommandListFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY command list should be optimized for submission to a single command
///< queue and device engine.
///< driver **must** disable any implicit optimizations for distributing
///< work across multiple engines.
///< this flag should be used when applications want full control over
///< multi-engine submission and scheduling.
///< This flag is **DEPRECATED** and implementations are not expected to
///< support this feature.
ZE_COMMAND_LIST_FLAG_IN_ORDER ZeCommandListFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_COMMAND_LIST_FLAG_IN_ORDER commands appended to this command list are executed in-order, with
///< driver implementation
///< enforcing dependencies between them. Application is not required to
///< have the signal event
///< of a given command being the wait event of the next to define an
///< in-order list, and
///< application is allowed to pass signal and wait events to each appended
///< command to implement
///< more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING.
ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE ZeCommandListFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE this command list may be cloned using ::zeCommandListCreateCloneExp
///< after ::zeCommandListClose.
ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT ZeCommandListFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT Try to offload copy operations to different engines. Applicable only
///< for compute queues.
///< This is only a hint. Driver may ignore it per append call, based on
///< platform capabilities or internal heuristics.
ZE_COMMAND_LIST_FLAG_FORCE_UINT32 ZeCommandListFlags = 0x7fffffff // ZE_COMMAND_LIST_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs
)
// ZeCommandListDesc (ze_command_list_desc_t) Command List descriptor
type ZeCommandListDesc 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).
Commandqueuegroupordinal uint32 // Commandqueuegroupordinal [in] command queue group ordinal to which this command list will be submitted
Flags ZeCommandListFlags // Flags [in] usage flags. must be 0 (default) or a valid combination of ::ze_command_list_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput.
}
// ZeCommandListCreate Creates a command list on the context.
// /
// / @details
// / - A command list represents a sequence of commands for execution on a
// / command queue.
// / - The command list is created in the 'open' state.
// / - The application must only use the command list for the device, or its
// / sub-devices, which was 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`
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == desc`
// / + `nullptr == phCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
// / + `0x3f < desc->flags`
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeCommandListCreate(
hContext ZeContextHandle, // hContext [in] handle of the context object
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
desc *ZeCommandListDesc, // desc [in] pointer to command list descriptor
phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phCommandList)))
}
// ZeCommandListCreateImmediate Creates an immediate command list on the context.
// /
// / @details
// / - An immediate command list is used for low-latency submission of
// / commands.
// / - An immediate command list creates an implicit command queue.
// / - Immediate command lists must not be passed to
// / ::zeCommandQueueExecuteCommandLists.
// / - Commands appended into an immediate command list may execute
// / synchronously, by blocking until the command is complete.
// / - The command list is created in the 'open' state and never needs to be
// / closed.
// / - The application must only use the command list for the device, or its
// / sub-devices, which was 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`
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == altdesc`
// / + `nullptr == phCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
// / + `0x7 < altdesc->flags`
// / + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < altdesc->mode`
// / + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < altdesc->priority`
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeCommandListCreateImmediate(
hContext ZeContextHandle, // hContext [in] handle of the context object
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
altdesc *ZeCommandQueueDesc, // altdesc [in] pointer to command queue descriptor
phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListCreateImmediate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(altdesc)), uintptr(unsafe.Pointer(phCommandList)))
}
// ZeCommandListDestroy Destroys a command list.
// /
// / @details
// / - The application must ensure the device is not currently referencing
// / the command list before it is deleted.
// / - The implementation of this function may immediately free all Host and
// / Device allocations associated with this command list.
// / - The application must **not** call this function from simultaneous
// / threads with the same command list 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 == hCommandList`
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
func ZeCommandListDestroy(
hCommandList ZeCommandListHandle, // hCommandList [in][release] handle of command list object to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListDestroy", uintptr(hCommandList))
}
// ZeCommandListClose Closes a command list; ready to be executed by a command queue.
// /
// / @details
// / - 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`
func ZeCommandListClose(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to close
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListClose", uintptr(hCommandList))
}
// ZeCommandListReset Reset a command list to initial (empty) state; ready for appending
// / commands.
// /
// / @details
// / - The application must ensure the device is not currently referencing
// / the command list before it is reset
// / - 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`
func ZeCommandListReset(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to reset
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListReset", uintptr(hCommandList))
}
// ZeCommandListAppendWriteGlobalTimestamp Appends a memory write of the device's global timestamp value into a
// / command list.
// /
// / @details
// / - The application must ensure the events are accessible by the device on
// / which the command list was created.
// / - 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 `timestampValidBits` member of ::ze_device_properties_t.
// / - The application must ensure the memory pointed to by dstptr is
// / accessible by the device on which the command list was created.
// / - 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 == dstptr`
// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
// / - ::ZE_RESULT_ERROR_INVALID_SIZE
// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
func ZeCommandListAppendWriteGlobalTimestamp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
dstptr *uint64, // dstptr [in,out] pointer to memory where timestamp value will be written; must be 8byte-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]("zeCommandListAppendWriteGlobalTimestamp", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}
// ZeCommandListHostSynchronize Synchronizes an immediate command list by waiting on the host for the
// / completion of all commands previously submitted to it.
// /
// / @details
// / - The application must call this function only with command lists
// / created with ::zeCommandListCreateImmediate.
// / - Waiting on one immediate command list shall not block the concurrent
// / execution of commands appended to other
// / immediate command lists created with either a different ordinal or
// / different index.
// / - 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_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_NOT_READY
// / + timeout expired
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + handle does not correspond to an immediate command list
func ZeCommandListHostSynchronize(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the immediate command list
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 immediately returns the status of the immediate command list; 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]("zeCommandListHostSynchronize", uintptr(hCommandList), uintptr(timeout))
}
// ZeCommandListGetDeviceHandle Gets the handle of the device on which the command list 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 == hCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == phDevice`
func ZeCommandListGetDeviceHandle(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
phDevice *ZeDeviceHandle, // phDevice [out] handle of the device on which the command list was created
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListGetDeviceHandle", uintptr(hCommandList), uintptr(unsafe.Pointer(phDevice)))
}
// ZeCommandListGetContextHandle Gets the handle of the context on which the command list 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 == hCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == phContext`
func ZeCommandListGetContextHandle(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
phContext *ZeContextHandle, // phContext [out] handle of the context on which the command list was created
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListGetContextHandle", uintptr(hCommandList), uintptr(unsafe.Pointer(phContext)))
}
// ZeCommandListGetOrdinal Gets the command queue group ordinal to which the command list is
// / submitted.
// /
// / @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 == hCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pOrdinal`
func ZeCommandListGetOrdinal(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
pOrdinal *uint32, // pOrdinal [out] command queue group ordinal to which command list is submitted
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListGetOrdinal", uintptr(hCommandList), uintptr(unsafe.Pointer(pOrdinal)))
}
// ZeCommandListImmediateGetIndex Gets the command queue index within the group to which the immediate
// / command list is submitted.
// /
// / @details
// / - The application must call this function only with command lists
// / created with ::zeCommandListCreateImmediate.
// / - 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_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 == hCommandListImmediate`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pIndex`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + handle does not correspond to an immediate command list
func ZeCommandListImmediateGetIndex(
hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list
pIndex *uint32, // pIndex [out] command queue index within the group to which the immediate command list is submitted
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListImmediateGetIndex", uintptr(hCommandListImmediate), uintptr(unsafe.Pointer(pIndex)))
}
// ZeCommandListIsImmediate Query whether a command list is an immediate command list.
// /
// / @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 == hCommandList`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pIsImmediate`
func ZeCommandListIsImmediate(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
pIsImmediate *ZeBool, // pIsImmediate [out] Boolean indicating whether the command list is an immediate command list (true) or not (false)
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListIsImmediate", uintptr(hCommandList), uintptr(unsafe.Pointer(pIsImmediate)))
}