1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00

feat(gen): finish parsing ze_api.h

This commit is contained in:
源文雨
2026-03-22 23:38:41 +08:00
parent 64f95b23a7
commit d42d758aeb
43 changed files with 7235 additions and 32 deletions

View File

@@ -17,38 +17,67 @@ const (
var (
typemap = map[string]string{
"char": "byte",
"char*": "*byte",
"const char*": "*byte",
"char**": "**byte",
"const char**": "**byte",
"char": "byte",
"char*": "*byte",
"const char*": "*byte",
"char**": "**byte",
"const char**": "**byte",
"char***": "***byte",
"const char***": "***byte",
"void*": "unsafe.Pointer",
"void *": "unsafe.Pointer",
"const void*": "unsafe.Pointer",
"void**": "*unsafe.Pointer",
"void **": "*unsafe.Pointer",
"const void**": "*unsafe.Pointer",
"void*": "unsafe.Pointer",
"void *": "unsafe.Pointer",
"const void*": "unsafe.Pointer",
"void**": "*unsafe.Pointer",
"void **": "*unsafe.Pointer",
"const void**": "*unsafe.Pointer",
"void***": "**unsafe.Pointer",
"void ***": "**unsafe.Pointer",
"const void***": "**unsafe.Pointer",
"size_t": "uintptr",
"size_t*": "*uintptr",
"size_t": "uintptr",
"size_t*": "*uintptr",
"size_t *": "*uintptr",
"int": "int32",
"int": "int32",
"unsigned int": "uint32",
"float": "float32",
"double": "float64",
}
unsafeExcludeRegions = map[string]struct{}{
"globaloffset": {},
"bfloat16conversions": {},
"globaloffset": {},
"linkonceodr": {},
"subgroups": {},
}
zecallExcludeRegions = map[string]struct{}{
"CacheLineSize": {},
"common": {},
"driverDDIHandles": {},
"floatAtomics": {},
"program": {},
"raytracing": {},
"relaxedAllocLimits": {},
"bandwidth": {},
"bfloat16conversions": {},
"CacheLineSize": {},
"callbacks": {},
"common": {},
"counterbasedeventpool": {},
"deviceipversion": {},
"deviceLUID": {},
"deviceusablememproperties": {},
"driverDDIHandles": {},
"EUCount": {},
"externalMemMap": {},
"floatAtomics": {},
"imageFormatSupport": {},
"imageviewplanar": {},
"kernelMaxGroupSizeProperties": {},
"linkonceodr": {},
"memoryCompressionHints": {},
"memoryProperties": {},
"powersavinghint": {},
"program": {},
"raytracing": {},
"relaxedAllocLimits": {},
"SRGB": {},
"subAllocationsProperties": {},
"subgroups": {},
}
)
@@ -102,14 +131,22 @@ func scanHeader(name string, scan *bufio.Scanner) {
f.WriteString("\n")
f.WriteString("package ")
f.WriteString(name)
f.WriteString("\n\nimport (")
f.WriteString("\n\n")
noimport := true
sb := strings.Builder{}
sb.WriteString("import (")
if _, ok := unsafeExcludeRegions[region]; !ok {
f.WriteString("\n\t\"unsafe\"\n")
sb.WriteString("\n\t\"unsafe\"\n")
noimport = false
}
if _, ok := zecallExcludeRegions[region]; !ok {
f.WriteString("\n\t\"github.com/fumiama/gozel/internal/zecall\"\n")
sb.WriteString("\n\t\"github.com/fumiama/gozel/internal/zecall\"\n")
noimport = false
}
sb.WriteString(")\n\n")
if !noimport {
f.WriteString(sb.String())
}
f.WriteString(")\n\n")
regionfile = f
// block barrier
case strings.HasPrefix(t, "///////////////////////////////////////////////////////////////////////////////"):
@@ -123,7 +160,7 @@ func scanHeader(name string, scan *bufio.Scanner) {
regionfile = nil
// skip outer #
case strings.HasPrefix(t, "#") || t == "" || strings.HasPrefix(t, "// ") ||
strings.HasPrefix(t, "extern "):
strings.Contains(t, `extern "C"`):
fmt.Println(" [scan] skip", t)
continue
default:
@@ -274,6 +311,30 @@ func scanTypedef(
ln = newln
if strings.Contains(s, "\n") { // multi-line typedef
lines := strings.Split(s, "\n")
if strings.Contains(lines[0], " (*") || strings.Contains(lines[0], "ZE_APICALL") { // is func ptr typedef
_, remains, ok := strings.Cut(lines[0], " (*")
if !ok {
_, remains, ok = strings.Cut(lines[0], "ZE_APICALL")
if !ok {
panic(fmt.Sprintf("%s L%d: unexpected func typdef line %s", name, ln, firstln))
}
}
fnname, _, _ := strings.Cut(strings.TrimPrefix(strings.TrimSpace(remains), "*"), "_t")
fnname = strings.TrimSpace(fnname)
if fnname == "" {
panic(fmt.Sprintf("%s L%d: unexpected func typdef line %s", name, ln, firstln))
}
goname := us2camel(fnname)
fnname += "_t"
checkSymbolName(symtab, ln, name, fnname, goname, sb, f, func() *symbol {
return newSymbolConst(fnname, goname, symbolSubTypeFuncPtr)
})
f.WriteString("// gozel warn: please use C function pointer loaded from C library!\n")
f.WriteString("type ")
f.WriteString(goname)
f.WriteString(" uintptr\n\n")
return ln
}
if len(lines) < 4 {
panic(fmt.Sprintf("%s L%d: unexpected short multi typdef line %s", name, ln, firstln))
}
@@ -303,7 +364,10 @@ func scanTypedef(
strings.HasPrefix(stat, "const void* ") || strings.HasPrefix(stat, "int ") ||
strings.HasPrefix(stat, "const void** ") || strings.HasPrefix(stat, "const char* ") ||
strings.HasPrefix(stat, "const char** ") || strings.HasPrefix(stat, "float ") ||
strings.HasPrefix(stat, "double "):
strings.HasPrefix(stat, "double ") || strings.HasPrefix(stat, "void** ") ||
strings.HasPrefix(stat, "const void*** ") || strings.HasPrefix(stat, "void*** ") ||
strings.HasPrefix(stat, "const char*** ") || strings.HasPrefix(stat, "char** ") ||
strings.HasPrefix(stat, "char*** "):
remains, sz := "", ""
ok := false
remains, c, ok = strings.Cut(stat, ";")
@@ -546,7 +610,7 @@ func scanTypedef(
}
sname := strings.TrimSpace(strings.TrimSuffix(strings.TrimSpace(typs[1]), ";"))
val := us2camel(strings.TrimSuffix(sname, "_t"))
origtyp := strings.TrimSuffix(strings.TrimSpace(typs[0]), "_t")
origtyp := strings.TrimSuffix(symtab.apply(strings.TrimSpace(typs[0])), "_t")
checkSymbolName(symtab, ln, name, sname, val, sb, f, func() *symbol {
return newSymbolConst(sname, val, symbolSubTypeEmptyStruct)
})

View File

@@ -46,6 +46,7 @@ const (
symbolSubTypeEmptyStruct
symbolSubTypeLargeStruct
symbolSubTypeEnum
symbolSubTypeFuncPtr
)
type symbol struct {

44
core/EUCount.go Normal file
View File

@@ -0,0 +1,44 @@
// 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 core
import (
"unsafe"
)
// ZE_EU_COUNT_EXT_NAME EU Count Extension Name
const ZE_EU_COUNT_EXT_NAME = "ZE_extension_eu_count"
// ZeEuCountExtVersion (ze_eu_count_ext_version_t) EU Count Extension Version(s)
type ZeEuCountExtVersion uintptr
const (
ZE_EU_COUNT_EXT_VERSION_1_0 ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EU_COUNT_EXT_VERSION_1_0 version 1.0
ZE_EU_COUNT_EXT_VERSION_CURRENT ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EU_COUNT_EXT_VERSION_CURRENT latest known version
ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 ZeEuCountExtVersion = 0x7fffffff // ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs
)
// ZeEuCountExt (ze_eu_count_ext_t) EU count queried using ::zeDeviceGetProperties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetProperties via the
/// `pNext` member of ::ze_device_properties_t.
/// - Used for determining the total number of EUs available on device.
type ZeEuCountExt 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).
Numtotaleus uint32 // Numtotaleus [out] Total number of EUs available
}

100
core/PCIProperties.go Normal file
View File

@@ -0,0 +1,100 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_PCI_PROPERTIES_EXT_NAME PCI Properties Extension Name
const ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties"
// ZePciPropertiesExtVersion (ze_pci_properties_ext_version_t) PCI Properties Extension Version(s)
type ZePciPropertiesExtVersion uintptr
const (
ZE_PCI_PROPERTIES_EXT_VERSION_1_0 ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_PCI_PROPERTIES_EXT_VERSION_1_0 version 1.0
ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT latest known version
ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZePciPropertiesExtVersion = 0x7fffffff // ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs
)
// ZePciAddressExt (ze_pci_address_ext_t) Device PCI address
///
/// @details
/// - This structure may be passed to ::zeDevicePciGetPropertiesExt as an
/// attribute of ::ze_pci_ext_properties_t.
/// - A PCI BDF address is the bus:device:function address of the device and
/// is useful for locating the device in the PCI switch fabric.
type ZePciAddressExt struct {
Domain uint32 // Domain [out] PCI domain number
Bus uint32 // Bus [out] PCI BDF bus number
Device uint32 // Device [out] PCI BDF device number
Function uint32 // Function [out] PCI BDF function number
}
// ZePciSpeedExt (ze_pci_speed_ext_t) Device PCI speed
type ZePciSpeedExt struct {
Genversion int32 // Genversion [out] The link generation. A value of -1 means that this property is unknown.
Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown.
Maxbandwidth int64 // Maxbandwidth [out] The theoretical maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown.
}
// ZePciExtProperties (ze_pci_ext_properties_t) Static PCI properties
type ZePciExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Address ZePciAddressExt // Address [out] The BDF address
Maxspeed ZePciSpeedExt // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes)
}
// ZeDevicePciGetPropertiesExt Get PCI properties - address, max speed
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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 == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pPciProperties`
func ZeDevicePciGetPropertiesExt(
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object.
pPciProperties *ZePciExtProperties, // pPciProperties [in,out] returns the PCI properties of the device.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDevicePciGetPropertiesExt", uintptr(hDevice), uintptr(unsafe.Pointer(pPciProperties)))
}

View File

@@ -456,3 +456,482 @@ type ZeRtasGeometryAabbsExtCbParams struct {
}
// ZeRtasGeometryAabbsCbExt (ze_rtas_geometry_aabbs_cb_ext_t) Callback function pointer type to return AABBs for a range of
/// procedural primitives
// gozel warn: please use C function pointer loaded from C library!
type ZeRtasGeometryAabbsCbExt uintptr
// ZeRtasBuilderProceduralGeometryInfoExt (ze_rtas_builder_procedural_geometry_info_ext_t) Ray tracing acceleration structure builder procedural primitives
/// geometry info
///
/// @details
/// - A host-side bounds callback function is invoked by the acceleration
/// structure builder to query the bounds of procedural primitives on
/// demand. The callback is passed some `pGeomUserPtr` that can point to
/// an application-side representation of the procedural primitives.
/// Further, a second `pBuildUserPtr`, which is set by a parameter to
/// ::zeRTASBuilderBuildExt, is passed to the callback. This allows the
/// build to change the bounds of the procedural geometry, for example, to
/// build a BVH only over a short time range to implement multi-segment
/// motion blur.
type ZeRtasBuilderProceduralGeometryInfoExt struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL
Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Reserved uint8 // Reserved [in] reserved for future use
Primcount uint32 // Primcount [in] number of primitives in geometry
Pfngetboundscb ZeRtasGeometryAabbsCbExt // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives
Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback
}
// ZeRtasBuilderInstanceGeometryInfoExt (ze_rtas_builder_instance_geometry_info_ext_t) Ray tracing acceleration structure builder instance geometry info
type ZeRtasBuilderInstanceGeometryInfoExt struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE
Instanceflags ZeRtasBuilderPackedInstanceExtFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Transformformat ZeRtasBuilderPackedInputDataFormatExt // Transformformat [in] format of the specified transformation
Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance
Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format
Pbounds *ZeRtasAabbExt // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure
Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] device pointer to acceleration structure to instantiate
}
// ZeRtasBuilderBuildOpExtDesc (ze_rtas_builder_build_op_ext_desc_t)
type ZeRtasBuilderBuildOpExtDesc 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).
Rtasformat ZeRtasFormatExt // Rtasformat [in] ray tracing acceleration structure format
Buildquality ZeRtasBuilderBuildQualityHintExt // Buildquality [in] acceleration structure build quality hint
Buildflags ZeRtasBuilderBuildOpExtFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t flags
Ppgeometries **ZeRtasBuilderGeometryInfoExt // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos
Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL
}
// ZeRTASBuilderCreateExt Creates a ray tracing acceleration structure builder object
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_RTAS_EXT_NAME extension.
///
/// @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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pDescriptor`
/// + `nullptr == phBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_BUILDER_EXT_VERSION_CURRENT < pDescriptor->builderVersion`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeRTASBuilderCreateExt(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
pDescriptor *ZeRtasBuilderExtDesc, // pDescriptor [in] pointer to builder descriptor
phBuilder *ZeRtasBuilderExtHandle, // phBuilder [out] handle of builder object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderCreateExt", uintptr(hDriver), uintptr(unsafe.Pointer(pDescriptor)), uintptr(unsafe.Pointer(phBuilder)))
}
// ZeRTASBuilderGetBuildPropertiesExt Retrieves ray tracing acceleration structure builder properties
///
/// @details
/// - 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 == hBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pBuildOpDescriptor`
/// + `nullptr == pProperties`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat`
/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality`
/// + `0x3 < pBuildOpDescriptor->buildFlags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeRTASBuilderGetBuildPropertiesExt(
hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object
pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor
pProperties *ZeRtasBuilderExtProperties, // pProperties [in,out] query result for builder properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderGetBuildPropertiesExt", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pProperties)))
}
// ZeDriverRTASFormatCompatibilityCheckExt Checks ray tracing acceleration structure format compatibility
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
///
/// @returns
/// - ::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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatA`
/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatB`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_SUCCESS
/// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`.
/// - ::ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE
/// + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`.
func ZeDriverRTASFormatCompatibilityCheckExt(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
rtasFormatA ZeRtasFormatExt, // rtasFormatA [in] operand A
rtasFormatB ZeRtasFormatExt, // rtasFormatB [in] operand B
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDriverRTASFormatCompatibilityCheckExt", uintptr(hDriver), uintptr(rtasFormatA), uintptr(rtasFormatB))
}
// ZeRTASBuilderBuildExt Build ray tracing acceleration structure
///
/// @details
/// - This function builds an acceleration structure of the scene consisting
/// of the specified geometry information and writes the acceleration
/// structure to the provided destination buffer. All types of geometries
/// can get freely mixed inside a scene.
/// - Before an acceleration structure can be built, the user must allocate
/// the memory for the acceleration structure buffer and scratch buffer
/// using sizes queried with the ::zeRTASBuilderGetBuildPropertiesExt function.
/// - When using the "worst-case" size for the acceleration structure
/// buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY.
/// - When using the "expected" size for the acceleration structure buffer,
/// the acceleration structure construction may fail with
/// ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. If this happens, the user may resize
/// their acceleration structure buffer using the returned
/// `*pRtasBufferSizeBytes` value, which will be updated with an improved
/// size estimate that will likely result in a successful build.
/// - The acceleration structure construction is run on the host and is
/// synchronous, thus after the function returns with a successful result,
/// the acceleration structure may be used.
/// - All provided data buffers must be host-accessible. The referenced
/// scene data (index- and vertex- buffers) have to be accessible from the
/// host, and will **not** be referenced by the build acceleration structure.
/// - The acceleration structure buffer is typicall a host allocation that
/// is later manually copied to a device allocation. Alternatively one can
/// also use a shared USM allocation as acceration structure buffer and
/// skip the copy.
/// - A successfully constructed acceleration structure is entirely
/// self-contained. There is no requirement for input data to persist
/// beyond build completion.
/// - A successfully constructed acceleration structure is non-copyable.
/// - Acceleration structure construction may be parallelized by passing a
/// valid handle to a parallel operation object and joining that parallel
/// operation using ::zeRTASParallelOperationJoinExt with user-provided
/// worker threads.
/// - A successfully constructed acceleration structure is generally
/// non-copyable. It can only get copied from host to device using the
/// special ::zeRTASBuilderCommandListAppendCopyExt function.
/// - **Additional Notes**
/// - "The geometry infos array, geometry infos, and scratch buffer must
/// all be standard host memory allocations."
/// - "A pointer to a geometry info can be a null pointer, in which case
/// the geometry is treated as empty."
/// - "If no parallel operation handle is provided, the build is run
/// sequentially on the current thread."
/// - "A parallel operation object may only be associated with a single
/// acceleration structure build at a time."
///
/// @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 == hBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pBuildOpDescriptor`
/// + `nullptr == pScratchBuffer`
/// + `nullptr == pRtasBuffer`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat`
/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality`
/// + `0x3 < pBuildOpDescriptor->buildFlags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_EXT_RTAS_BUILD_DEFERRED
/// + Acceleration structure build completion is deferred to parallel operation join.
/// - ::ZE_RESULT_EXT_RTAS_BUILD_RETRY
/// + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation.
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
/// + Acceleration structure build failed due to parallel operation object participation in another build operation.
func ZeRTASBuilderBuildExt(
hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object
pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor
pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction
scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes
pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer
rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes
hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][optional] handle to parallel operation object
pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks
pBounds *ZeRtasAabbExt, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds
pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderBuildExt", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pScratchBuffer)), uintptr(scratchBufferSizeBytes), uintptr(unsafe.Pointer(pRtasBuffer)), uintptr(rtasBufferSizeBytes), uintptr(hParallelOperation), uintptr(unsafe.Pointer(pBuildUserPtr)), uintptr(unsafe.Pointer(pBounds)), uintptr(unsafe.Pointer(pRtasBufferSizeBytes)))
}
// ZeRTASBuilderCommandListAppendCopyExt Copies a ray tracing acceleration structure (RTAS) from host to device
/// memory.
///
/// @details
/// - The memory pointed to by srcptr must be host memory containing a valid
/// ray tracing acceleration structure.
/// - The number of bytes to copy must be larger or equal to the size of the
/// ray tracing acceleration structure.
/// - The application must ensure the memory pointed to by dstptr and srcptr
/// is accessible by the device on which the command list was created.
/// - The implementation must not access the memory pointed to by dstptr and
/// srcptr as they are free to be modified by either the Host or device up
/// until execution.
/// - 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,
/// 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`
/// + `nullptr == srcptr`
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
func ZeRTASBuilderCommandListAppendCopyExt(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list
dstptr unsafe.Pointer, // dstptr [in] pointer to destination in device memory to copy the ray tracing acceleration structure to
srcptr unsafe.Pointer, // srcptr [in] pointer to a valid source ray tracing acceleration structure in host memory to copy from
size uintptr, // size [in] size in bytes to copy
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 launching; must be 0 if `nullptr == phWaitEvents`
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderCommandListAppendCopyExt", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(srcptr)), uintptr(size), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}
// ZeRTASBuilderDestroyExt Destroys a ray tracing acceleration structure builder object
///
/// @details
/// - The implementation of this function may immediately release any
/// internal Host and Device resources associated with this builder.
/// - The application must **not** call this function from simultaneous
/// threads with the same builder 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 == hBuilder`
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
func ZeRTASBuilderDestroyExt(
hBuilder ZeRtasBuilderExtHandle, // hBuilder [in][release] handle of builder object to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderDestroyExt", uintptr(hBuilder))
}
// ZeRTASParallelOperationCreateExt Creates a ray tracing acceleration structure builder parallel
/// operation object
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_RTAS_EXT_NAME extension.
///
/// @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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phParallelOperation`
func ZeRTASParallelOperationCreateExt(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
phParallelOperation *ZeRtasParallelOperationExtHandle, // phParallelOperation [out] handle of parallel operation object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationCreateExt", uintptr(hDriver), uintptr(unsafe.Pointer(phParallelOperation)))
}
// ZeRTASParallelOperationGetPropertiesExt Retrieves ray tracing acceleration structure builder parallel
/// operation properties
///
/// @details
/// - The application must first bind the parallel operation object to a
/// build operation before it may query the parallel operation properties.
/// In other words, the application must first call
/// ::zeRTASBuilderBuildExt with **hParallelOperation** before calling
/// this function.
/// - 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 == hParallelOperation`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pProperties`
func ZeRTASParallelOperationGetPropertiesExt(
hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object
pProperties *ZeRtasParallelOperationExtProperties, // pProperties [in,out] query result for parallel operation properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationGetPropertiesExt", uintptr(hParallelOperation), uintptr(unsafe.Pointer(pProperties)))
}
// ZeRTASParallelOperationJoinExt Joins a parallel build operation
///
/// @details
/// - All worker threads return the same error code for the parallel build
/// operation upon build completion
///
/// @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 == hParallelOperation`
func ZeRTASParallelOperationJoinExt(
hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationJoinExt", uintptr(hParallelOperation))
}
// ZeRTASParallelOperationDestroyExt Destroys a ray tracing acceleration structure builder parallel
/// operation object
///
/// @details
/// - The implementation of this function may immediately release any
/// internal Host and Device resources associated with this parallel
/// operation.
/// - The application must **not** call this function from simultaneous
/// threads with the same parallel operation 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 == hParallelOperation`
func ZeRTASParallelOperationDestroyExt(
hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationDestroyExt", uintptr(hParallelOperation))
}

882
core/RTASBuilder.go Normal file
View File

@@ -0,0 +1,882 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_RTAS_BUILDER_EXP_NAME Ray Tracing Acceleration Structure Builder Extension Name
const ZE_RTAS_BUILDER_EXP_NAME = "ZE_experimental_rtas_builder"
// ZeRtasBuilderExpVersion (ze_rtas_builder_exp_version_t) Ray Tracing Acceleration Structure Builder Extension Version(s)
type ZeRtasBuilderExpVersion uintptr
const (
ZE_RTAS_BUILDER_EXP_VERSION_1_0 ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXP_VERSION_1_0 version 1.0
ZE_RTAS_BUILDER_EXP_VERSION_CURRENT ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXP_VERSION_CURRENT latest known version
ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 ZeRtasBuilderExpVersion = 0x7fffffff // ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs
)
// ZeRtasDeviceExpFlags (ze_rtas_device_exp_flags_t) Ray tracing acceleration structure device flags
type ZeRtasDeviceExpFlags uint32
const (
ZE_RTAS_DEVICE_EXP_FLAG_RESERVED ZeRtasDeviceExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_DEVICE_EXP_FLAG_RESERVED reserved for future use
ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 ZeRtasDeviceExpFlags = 0x7fffffff // ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs
)
// ZeRtasFormatExp (ze_rtas_format_exp_t) Ray tracing acceleration structure format
///
/// @details
/// - This is an opaque ray tracing acceleration structure format
/// identifier.
type ZeRtasFormatExp uintptr
const (
ZE_RTAS_FORMAT_EXP_INVALID ZeRtasFormatExp = 0 // ZE_RTAS_FORMAT_EXP_INVALID Invalid acceleration structure format
ZE_RTAS_FORMAT_EXP_MAX ZeRtasFormatExp = 0x7ffffffe // ZE_RTAS_FORMAT_EXP_MAX Maximum acceleration structure format code
ZE_RTAS_FORMAT_EXP_FORCE_UINT32 ZeRtasFormatExp = 0x7fffffff // ZE_RTAS_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs
)
// ZeRtasBuilderExpFlags (ze_rtas_builder_exp_flags_t) Ray tracing acceleration structure builder flags
type ZeRtasBuilderExpFlags uint32
const (
ZE_RTAS_BUILDER_EXP_FLAG_RESERVED ZeRtasBuilderExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_EXP_FLAG_RESERVED Reserved for future use
ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs
)
// ZeRtasParallelOperationExpFlags (ze_rtas_parallel_operation_exp_flags_t) Ray tracing acceleration structure builder parallel operation flags
type ZeRtasParallelOperationExpFlags uint32
const (
ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED ZeRtasParallelOperationExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED Reserved for future use
ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 ZeRtasParallelOperationExpFlags = 0x7fffffff // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs
)
// ZeRtasBuilderGeometryExpFlags (ze_rtas_builder_geometry_exp_flags_t) Ray tracing acceleration structure builder geometry flags
type ZeRtasBuilderGeometryExpFlags uint32
const (
ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE ZeRtasBuilderGeometryExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE non-opaque geometries invoke an any-hit shader
ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderGeometryExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs
)
// ZeRtasBuilderPackedGeometryExpFlags (ze_rtas_builder_packed_geometry_exp_flags_t) Packed ray tracing acceleration structure builder geometry flags (see
/// ::ze_rtas_builder_geometry_exp_flags_t)
type ZeRtasBuilderPackedGeometryExpFlags uint8
// ZeRtasBuilderInstanceExpFlags (ze_rtas_builder_instance_exp_flags_t) Ray tracing acceleration structure builder instance flags
type ZeRtasBuilderInstanceExpFlags uint32
const (
ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE disables culling of front-facing and back-facing triangles
ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE reverses front and back face of triangles
ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE forces instanced geometry to be opaque, unless ray flag forces it to
///< be non-opaque
ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE forces instanced geometry to be non-opaque, unless ray flag forces it
///< to be opaque
ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderInstanceExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs
)
// ZeRtasBuilderPackedInstanceExpFlags (ze_rtas_builder_packed_instance_exp_flags_t) Packed ray tracing acceleration structure builder instance flags (see
/// ::ze_rtas_builder_instance_exp_flags_t)
type ZeRtasBuilderPackedInstanceExpFlags uint8
// ZeRtasBuilderBuildOpExpFlags (ze_rtas_builder_build_op_exp_flags_t) Ray tracing acceleration structure builder build operation flags
///
/// @details
/// - These flags allow the application to tune the acceleration structure
/// build operation.
/// - The acceleration structure builder implementation might choose to use
/// spatial splitting to split large or long primitives into smaller
/// pieces. This may result in any-hit shaders being invoked multiple
/// times for non-opaque primitives, unless
/// ::ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified.
/// - Usage of any of these flags may reduce ray tracing performance.
type ZeRtasBuilderBuildOpExpFlags uint32
const (
ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT build more compact acceleration structure
ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION guarantees single any-hit shader invocation per primitive
ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderBuildOpExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs
)
// ZeRtasBuilderBuildQualityHintExp (ze_rtas_builder_build_quality_hint_exp_t) Ray tracing acceleration structure builder build quality hint
///
/// @details
/// - Depending on use case different quality modes for acceleration
/// structure build are supported.
/// - A low-quality build builds an acceleration structure fast, but at the
/// cost of some reduction in ray tracing performance. This mode is
/// recommended for dynamic content, such as animated characters.
/// - A medium-quality build uses a compromise between build quality and ray
/// tracing performance. This mode should be used by default.
/// - Higher ray tracing performance can be achieved by using a high-quality
/// build, but acceleration structure build performance might be
/// significantly reduced.
type ZeRtasBuilderBuildQualityHintExp uintptr
const (
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW ZeRtasBuilderBuildQualityHintExp = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW build low-quality acceleration structure (fast)
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM ZeRtasBuilderBuildQualityHintExp = 1 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM build medium-quality acceleration structure (slower)
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH ZeRtasBuilderBuildQualityHintExp = 2 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH build high-quality acceleration structure (slow)
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 ZeRtasBuilderBuildQualityHintExp = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs
)
// ZeRtasBuilderGeometryTypeExp (ze_rtas_builder_geometry_type_exp_t) Ray tracing acceleration structure builder geometry type
type ZeRtasBuilderGeometryTypeExp uintptr
const (
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES ZeRtasBuilderGeometryTypeExp = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES triangle mesh geometry type
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS ZeRtasBuilderGeometryTypeExp = 1 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS quad mesh geometry type
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL ZeRtasBuilderGeometryTypeExp = 2 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL procedural geometry type
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE ZeRtasBuilderGeometryTypeExp = 3 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE instance geometry type
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 ZeRtasBuilderGeometryTypeExp = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs
)
// ZeRtasBuilderPackedGeometryTypeExp (ze_rtas_builder_packed_geometry_type_exp_t) Packed ray tracing acceleration structure builder geometry type (see
/// ::ze_rtas_builder_geometry_type_exp_t)
type ZeRtasBuilderPackedGeometryTypeExp uint8
// ZeRtasBuilderInputDataFormatExp (ze_rtas_builder_input_data_format_exp_t) Ray tracing acceleration structure data buffer element format
///
/// @details
/// - Specifies the format of data buffer elements.
/// - Data buffers may contain instancing transform matrices, triangle/quad
/// vertex indices, etc...
type ZeRtasBuilderInputDataFormatExp uintptr
const (
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 ZeRtasBuilderInputDataFormatExp = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 3-component float vector (see ::ze_rtas_float3_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 1 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR 3x4 affine transformation in column-major format (see
///< ::ze_rtas_transform_float3x4_column_major_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 2 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR 3x4 affine transformation in column-major format (see
///< ::ze_rtas_transform_float3x4_aligned_column_major_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR ZeRtasBuilderInputDataFormatExp = 3 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR 3x4 affine transformation in row-major format (see
///< ::ze_rtas_transform_float3x4_row_major_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB ZeRtasBuilderInputDataFormatExp = 4 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 5 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 Unsigned 32-bit triangle indices (see
///< ::ze_rtas_triangle_indices_uint32_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 6 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t)
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 ZeRtasBuilderInputDataFormatExp = 0x7fffffff // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs
)
// ZeRtasBuilderPackedInputDataFormatExp (ze_rtas_builder_packed_input_data_format_exp_t) Packed ray tracing acceleration structure data buffer element format
/// (see ::ze_rtas_builder_input_data_format_exp_t)
type ZeRtasBuilderPackedInputDataFormatExp uint8
// ZeRtasBuilderExpHandle (ze_rtas_builder_exp_handle_t) Handle of ray tracing acceleration structure builder object
type ZeRtasBuilderExpHandle uintptr
// ZeRtasParallelOperationExpHandle (ze_rtas_parallel_operation_exp_handle_t) Handle of ray tracing acceleration structure builder parallel
/// operation object
type ZeRtasParallelOperationExpHandle uintptr
// ZeRtasBuilderExpDesc (ze_rtas_builder_exp_desc_t) Ray tracing acceleration structure builder descriptor
type ZeRtasBuilderExpDesc 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).
Builderversion ZeRtasBuilderExpVersion // Builderversion [in] ray tracing acceleration structure builder version
}
// ZeRtasBuilderExpProperties (ze_rtas_builder_exp_properties_t) Ray tracing acceleration structure builder properties
type ZeRtasBuilderExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Flags ZeRtasBuilderExpFlags // Flags [out] ray tracing acceleration structure builder flags
Rtasbuffersizebytesexpected uintptr // Rtasbuffersizebytesexpected [out] expected size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is expected to succeed; however, it is possible that the build may fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY
Rtasbuffersizebytesmaxrequired uintptr // Rtasbuffersizebytesmaxrequired [out] worst-case size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is guaranteed to not run out of memory.
Scratchbuffersizebytes uintptr // Scratchbuffersizebytes [out] scratch buffer size (in bytes) required for acceleration structure build.
}
// ZeRtasParallelOperationExpProperties (ze_rtas_parallel_operation_exp_properties_t) Ray tracing acceleration structure builder parallel operation
/// properties
type ZeRtasParallelOperationExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Flags ZeRtasParallelOperationExpFlags // Flags [out] ray tracing acceleration structure builder parallel operation flags
Maxconcurrency uint32 // Maxconcurrency [out] maximum number of threads that may join the parallel operation
}
// ZeRtasDeviceExpProperties (ze_rtas_device_exp_properties_t) Ray tracing acceleration structure device properties
///
/// @details
/// - This structure may be passed to ::zeDeviceGetProperties, via `pNext`
/// member of ::ze_device_properties_t.
/// - The implementation shall populate `format` with a value other than
/// ::ZE_RTAS_FORMAT_EXP_INVALID when the device supports ray tracing.
type ZeRtasDeviceExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Flags ZeRtasDeviceExpFlags // Flags [out] ray tracing acceleration structure device flags
Rtasformat ZeRtasFormatExp // Rtasformat [out] ray tracing acceleration structure format
Rtasbufferalignment uint32 // Rtasbufferalignment [out] required alignment of acceleration structure buffer
}
// ZeRtasFloat3Exp (ze_rtas_float3_exp_t) A 3-component vector type
type ZeRtasFloat3Exp struct {
X float32 // X [in] x-coordinate of float3 vector
Y float32 // Y [in] y-coordinate of float3 vector
Z float32 // Z [in] z-coordinate of float3 vector
}
// ZeRtasTransformFloat3x4ColumnMajorExp (ze_rtas_transform_float3x4_column_major_exp_t) 3x4 affine transformation in column-major layout
///
/// @details
/// - A 3x4 affine transformation in column major layout, consisting of vectors
/// - vx=(vx_x, vx_y, vx_z),
/// - vy=(vy_x, vy_y, vy_z),
/// - vz=(vz_x, vz_y, vz_z), and
/// - p=(p_x, p_y, p_z)
/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy +
/// z*vz + p`.
type ZeRtasTransformFloat3x4ColumnMajorExp struct {
VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix
VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix
VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix
VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix
VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix
VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix
VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix
VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix
VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix
PX float32 // PX [in] element 0 of column 3 of 3x4 matrix
PY float32 // PY [in] element 1 of column 3 of 3x4 matrix
PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix
}
// ZeRtasTransformFloat3x4AlignedColumnMajorExp (ze_rtas_transform_float3x4_aligned_column_major_exp_t) 3x4 affine transformation in column-major layout with aligned column
/// vectors
///
/// @details
/// - A 3x4 affine transformation in column major layout, consisting of vectors
/// - vx=(vx_x, vx_y, vx_z),
/// - vy=(vy_x, vy_y, vy_z),
/// - vz=(vz_x, vz_y, vz_z), and
/// - p=(p_x, p_y, p_z)
/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy +
/// z*vz + p`.
/// - The column vectors are aligned to 16-bytes and pad members are
/// ignored.
type ZeRtasTransformFloat3x4AlignedColumnMajorExp struct {
VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix
VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix
VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix
Pad0 float32 // Pad0 [in] ignored padding
VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix
VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix
VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix
Pad1 float32 // Pad1 [in] ignored padding
VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix
VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix
VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix
Pad2 float32 // Pad2 [in] ignored padding
PX float32 // PX [in] element 0 of column 3 of 3x4 matrix
PY float32 // PY [in] element 1 of column 3 of 3x4 matrix
PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix
Pad3 float32 // Pad3 [in] ignored padding
}
// ZeRtasTransformFloat3x4RowMajorExp (ze_rtas_transform_float3x4_row_major_exp_t) 3x4 affine transformation in row-major layout
///
/// @details
/// - A 3x4 affine transformation in row-major layout, consisting of vectors
/// - vx=(vx_x, vx_y, vx_z),
/// - vy=(vy_x, vy_y, vy_z),
/// - vz=(vz_x, vz_y, vz_z), and
/// - p=(p_x, p_y, p_z)
/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy +
/// z*vz + p`.
type ZeRtasTransformFloat3x4RowMajorExp struct {
VxX float32 // VxX [in] element 0 of row 0 of 3x4 matrix
VyX float32 // VyX [in] element 1 of row 0 of 3x4 matrix
VzX float32 // VzX [in] element 2 of row 0 of 3x4 matrix
PX float32 // PX [in] element 3 of row 0 of 3x4 matrix
VxY float32 // VxY [in] element 0 of row 1 of 3x4 matrix
VyY float32 // VyY [in] element 1 of row 1 of 3x4 matrix
VzY float32 // VzY [in] element 2 of row 1 of 3x4 matrix
PY float32 // PY [in] element 3 of row 1 of 3x4 matrix
VxZ float32 // VxZ [in] element 0 of row 2 of 3x4 matrix
VyZ float32 // VyZ [in] element 1 of row 2 of 3x4 matrix
VzZ float32 // VzZ [in] element 2 of row 2 of 3x4 matrix
PZ float32 // PZ [in] element 3 of row 2 of 3x4 matrix
}
// ZeRtasAabbExp (ze_rtas_aabb_exp_t) A 3-dimensional axis-aligned bounding-box with lower and upper bounds
/// in each dimension
type ZeRtasAabbExp struct {
Lower ZeRtasFloat3Exp // Lower [in] lower bounds of AABB
Upper ZeRtasFloat3Exp // Upper [in] upper bounds of AABB
}
// ZeRtasTriangleIndicesUint32Exp (ze_rtas_triangle_indices_uint32_exp_t) Triangle represented using 3 vertex indices
///
/// @details
/// - Represents a triangle using 3 vertex indices that index into a vertex
/// array that needs to be provided together with the index array.
/// - The linear barycentric u/v parametrization of the triangle is defined as:
/// - (u=0, v=0) at v0,
/// - (u=1, v=0) at v1, and
/// - (u=0, v=1) at v2
type ZeRtasTriangleIndicesUint32Exp struct {
V0 uint32 // V0 [in] first index pointing to the first triangle vertex in vertex array
V1 uint32 // V1 [in] second index pointing to the second triangle vertex in vertex array
V2 uint32 // V2 [in] third index pointing to the third triangle vertex in vertex array
}
// ZeRtasQuadIndicesUint32Exp (ze_rtas_quad_indices_uint32_exp_t) Quad represented using 4 vertex indices
///
/// @details
/// - Represents a quad composed of 4 indices that index into a vertex array
/// that needs to be provided together with the index array.
/// - A quad is a triangle pair represented using 4 vertex indices v0, v1,
/// v2, v3.
/// The first triangle is made out of indices v0, v1, v3 and the second triangle
/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization
/// of the quad is defined as:
/// - (u=0, v=0) at v0,
/// - (u=1, v=0) at v1,
/// - (u=0, v=1) at v3, and
/// - (u=1, v=1) at v2
/// This is achieved by correcting the u'/v' coordinates of the second
/// triangle by
/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization.
type ZeRtasQuadIndicesUint32Exp struct {
V0 uint32 // V0 [in] first index pointing to the first quad vertex in vertex array
V1 uint32 // V1 [in] second index pointing to the second quad vertex in vertex array
V2 uint32 // V2 [in] third index pointing to the third quad vertex in vertex array
V3 uint32 // V3 [in] fourth index pointing to the fourth quad vertex in vertex array
}
// ZeRtasBuilderGeometryInfoExp (ze_rtas_builder_geometry_info_exp_t) Ray tracing acceleration structure builder geometry info
type ZeRtasBuilderGeometryInfoExp struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type
}
// ZeRtasBuilderTrianglesGeometryInfoExp (ze_rtas_builder_triangles_geometry_info_exp_t) Ray tracing acceleration structure builder triangle mesh geometry info
///
/// @details
/// - The linear barycentric u/v parametrization of the triangle is defined as:
/// - (u=0, v=0) at v0,
/// - (u=1, v=0) at v1, and
/// - (u=0, v=1) at v2
type ZeRtasBuilderTrianglesGeometryInfoExp struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES
Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Triangleformat ZeRtasBuilderPackedInputDataFormatExp // Triangleformat [in] format of triangle buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32
Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3
Trianglecount uint32 // Trianglecount [in] number of triangles in triangle buffer
Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer
Trianglestride uint32 // Trianglestride [in] stride (in bytes) of triangles in triangle buffer
Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer
Ptrianglebuffer unsafe.Pointer // Ptrianglebuffer [in] pointer to array of triangle indices in specified format
Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of triangle vertices in specified format
}
// ZeRtasBuilderQuadsGeometryInfoExp (ze_rtas_builder_quads_geometry_info_exp_t) Ray tracing acceleration structure builder quad mesh geometry info
///
/// @details
/// - A quad is a triangle pair represented using 4 vertex indices v0, v1,
/// v2, v3.
/// The first triangle is made out of indices v0, v1, v3 and the second triangle
/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization
/// of the quad is defined as:
/// - (u=0, v=0) at v0,
/// - (u=1, v=0) at v1,
/// - (u=0, v=1) at v3, and
/// - (u=1, v=1) at v2
/// This is achieved by correcting the u'/v' coordinates of the second
/// triangle by
/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization.
type ZeRtasBuilderQuadsGeometryInfoExp struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS
Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Quadformat ZeRtasBuilderPackedInputDataFormatExp // Quadformat [in] format of quad buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32
Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3
Quadcount uint32 // Quadcount [in] number of quads in quad buffer
Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer
Quadstride uint32 // Quadstride [in] stride (in bytes) of quads in quad buffer
Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer
Pquadbuffer unsafe.Pointer // Pquadbuffer [in] pointer to array of quad indices in specified format
Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of quad vertices in specified format
}
// ZeRtasGeometryAabbsExpCbParams (ze_rtas_geometry_aabbs_exp_cb_params_t) AABB callback function parameters
type ZeRtasGeometryAabbsExpCbParams struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Primid uint32 // Primid [in] first primitive to return bounds for
Primidcount uint32 // Primidcount [in] number of primitives to return bounds for
Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] pointer provided through geometry descriptor
Pbuilduserptr unsafe.Pointer // Pbuilduserptr [in] pointer provided through ::zeRTASBuilderBuildExp function
Pboundsout *ZeRtasAabbExp // Pboundsout [out] destination buffer to write AABB bounds to
}
// ZeRtasGeometryAabbsCbExp (ze_rtas_geometry_aabbs_cb_exp_t) Callback function pointer type to return AABBs for a range of
/// procedural primitives
// gozel warn: please use C function pointer loaded from C library!
type ZeRtasGeometryAabbsCbExp uintptr
// ZeRtasBuilderProceduralGeometryInfoExp (ze_rtas_builder_procedural_geometry_info_exp_t) Ray tracing acceleration structure builder procedural primitives
/// geometry info
///
/// @details
/// - A host-side bounds callback function is invoked by the acceleration
/// structure builder to query the bounds of procedural primitives on
/// demand. The callback is passed some `pGeomUserPtr` that can point to
/// an application-side representation of the procedural primitives.
/// Further, a second `pBuildUserPtr`, which is set by a parameter to
/// ::zeRTASBuilderBuildExp, is passed to the callback. This allows the
/// build to change the bounds of the procedural geometry, for example, to
/// build a BVH only over a short time range to implement multi-segment
/// motion blur.
type ZeRtasBuilderProceduralGeometryInfoExp struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL
Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Reserved uint8 // Reserved [in] reserved for future use
Primcount uint32 // Primcount [in] number of primitives in geometry
Pfngetboundscb ZeRtasGeometryAabbsCbExp // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives
Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback
}
// ZeRtasBuilderInstanceGeometryInfoExp (ze_rtas_builder_instance_geometry_info_exp_t) Ray tracing acceleration structure builder instance geometry info
type ZeRtasBuilderInstanceGeometryInfoExp struct {
Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE
Instanceflags ZeRtasBuilderPackedInstanceExpFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry
Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking
Transformformat ZeRtasBuilderPackedInputDataFormatExp // Transformformat [in] format of the specified transformation
Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance
Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format
Pbounds *ZeRtasAabbExp // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure
Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] pointer to acceleration structure to instantiate
}
// ZeRtasBuilderBuildOpExpDesc (ze_rtas_builder_build_op_exp_desc_t)
type ZeRtasBuilderBuildOpExpDesc 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).
Rtasformat ZeRtasFormatExp // Rtasformat [in] ray tracing acceleration structure format
Buildquality ZeRtasBuilderBuildQualityHintExp // Buildquality [in] acceleration structure build quality hint
Buildflags ZeRtasBuilderBuildOpExpFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_exp_flag_t flags
Ppgeometries **ZeRtasBuilderGeometryInfoExp // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos
Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL
}
// ZeRTASBuilderCreateExp Creates a ray tracing acceleration structure builder object
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension.
///
/// @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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pDescriptor`
/// + `nullptr == phBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_BUILDER_EXP_VERSION_CURRENT < pDescriptor->builderVersion`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeRTASBuilderCreateExp(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
pDescriptor *ZeRtasBuilderExpDesc, // pDescriptor [in] pointer to builder descriptor
phBuilder *ZeRtasBuilderExpHandle, // phBuilder [out] handle of builder object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderCreateExp", uintptr(hDriver), uintptr(unsafe.Pointer(pDescriptor)), uintptr(unsafe.Pointer(phBuilder)))
}
// ZeRTASBuilderGetBuildPropertiesExp Retrieves ray tracing acceleration structure builder properties
///
/// @details
/// - 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 == hBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pBuildOpDescriptor`
/// + `nullptr == pProperties`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat`
/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality`
/// + `0x3 < pBuildOpDescriptor->buildFlags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeRTASBuilderGetBuildPropertiesExp(
hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object
pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor
pProperties *ZeRtasBuilderExpProperties, // pProperties [in,out] query result for builder properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderGetBuildPropertiesExp", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pProperties)))
}
// ZeDriverRTASFormatCompatibilityCheckExp Checks ray tracing acceleration structure format compatibility
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
///
/// @returns
/// - ::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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatA`
/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatB`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_SUCCESS
/// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`.
/// - ::ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE
/// + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`.
func ZeDriverRTASFormatCompatibilityCheckExp(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
rtasFormatA ZeRtasFormatExp, // rtasFormatA [in] operand A
rtasFormatB ZeRtasFormatExp, // rtasFormatB [in] operand B
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDriverRTASFormatCompatibilityCheckExp", uintptr(hDriver), uintptr(rtasFormatA), uintptr(rtasFormatB))
}
// ZeRTASBuilderBuildExp Build ray tracing acceleration structure
///
/// @details
/// - This function builds an acceleration structure of the scene consisting
/// of the specified geometry information and writes the acceleration
/// structure to the provided destination buffer. All types of geometries
/// can get freely mixed inside a scene.
/// - It is the user's responsibility to manage the acceleration structure
/// buffer allocation, de-allocation, and potential prefetching to the
/// device memory. The required size of the acceleration structure buffer
/// can be queried with the ::zeRTASBuilderGetBuildPropertiesExp function.
/// The acceleration structure buffer must be a shared USM allocation and
/// should be present on the host at build time. The referenced scene data
/// (index- and vertex- buffers) can be standard host allocations, and
/// will not be referenced into by the build acceleration structure.
/// - Before an acceleration structure can be built, the user must allocate
/// the memory for the acceleration structure buffer and scratch buffer
/// using sizes based on a query for the estimated size properties.
/// - When using the "worst-case" size for the acceleration structure
/// buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY.
/// - When using the "expected" size for the acceleration structure buffer,
/// the acceleration structure construction may fail with
/// ::ZE_RESULT_EXP_RTAS_BUILD_RETRY. If this happens, the user may resize
/// their acceleration structure buffer using the returned
/// `*pRtasBufferSizeBytes` value, which will be updated with an improved
/// size estimate that will likely result in a successful build.
/// - The acceleration structure construction is run on the host and is
/// synchronous, thus after the function returns with a successful result,
/// the acceleration structure may be used.
/// - All provided data buffers must be host-accessible.
/// - The acceleration structure buffer must be a USM allocation.
/// - A successfully constructed acceleration structure is entirely
/// self-contained. There is no requirement for input data to persist
/// beyond build completion.
/// - A successfully constructed acceleration structure is non-copyable.
/// - Acceleration structure construction may be parallelized by passing a
/// valid handle to a parallel operation object and joining that parallel
/// operation using ::zeRTASParallelOperationJoinExp with user-provided
/// worker threads.
/// - **Additional Notes**
/// - "The geometry infos array, geometry infos, and scratch buffer must
/// all be standard host memory allocations."
/// - "A pointer to a geometry info can be a null pointer, in which case
/// the geometry is treated as empty."
/// - "If no parallel operation handle is provided, the build is run
/// sequentially on the current thread."
/// - "A parallel operation object may only be associated with a single
/// acceleration structure build at a time."
///
/// @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 == hBuilder`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pBuildOpDescriptor`
/// + `nullptr == pScratchBuffer`
/// + `nullptr == pRtasBuffer`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat`
/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality`
/// + `0x3 < pBuildOpDescriptor->buildFlags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_EXP_RTAS_BUILD_DEFERRED
/// + Acceleration structure build completion is deferred to parallel operation join.
/// - ::ZE_RESULT_EXP_RTAS_BUILD_RETRY
/// + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation.
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
/// + Acceleration structure build failed due to parallel operation object participation in another build operation.
func ZeRTASBuilderBuildExp(
hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object
pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor
pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction
scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes
pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer
rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes
hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][optional] handle to parallel operation object
pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks
pBounds *ZeRtasAabbExp, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds
pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderBuildExp", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pScratchBuffer)), uintptr(scratchBufferSizeBytes), uintptr(unsafe.Pointer(pRtasBuffer)), uintptr(rtasBufferSizeBytes), uintptr(hParallelOperation), uintptr(unsafe.Pointer(pBuildUserPtr)), uintptr(unsafe.Pointer(pBounds)), uintptr(unsafe.Pointer(pRtasBufferSizeBytes)))
}
// ZeRTASBuilderDestroyExp Destroys a ray tracing acceleration structure builder object
///
/// @details
/// - The implementation of this function may immediately release any
/// internal Host and Device resources associated with this builder.
/// - The application must **not** call this function from simultaneous
/// threads with the same builder 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 == hBuilder`
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
func ZeRTASBuilderDestroyExp(
hBuilder ZeRtasBuilderExpHandle, // hBuilder [in][release] handle of builder object to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASBuilderDestroyExp", uintptr(hBuilder))
}
// ZeRTASParallelOperationCreateExp Creates a ray tracing acceleration structure builder parallel
/// operation object
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension.
///
/// @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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phParallelOperation`
func ZeRTASParallelOperationCreateExp(
hDriver ZeDriverHandle, // hDriver [in] handle of driver object
phParallelOperation *ZeRtasParallelOperationExpHandle, // phParallelOperation [out] handle of parallel operation object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationCreateExp", uintptr(hDriver), uintptr(unsafe.Pointer(phParallelOperation)))
}
// ZeRTASParallelOperationGetPropertiesExp Retrieves ray tracing acceleration structure builder parallel
/// operation properties
///
/// @details
/// - The application must first bind the parallel operation object to a
/// build operation before it may query the parallel operation properties.
/// In other words, the application must first call
/// ::zeRTASBuilderBuildExp with **hParallelOperation** before calling
/// this function.
/// - 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 == hParallelOperation`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pProperties`
func ZeRTASParallelOperationGetPropertiesExp(
hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object
pProperties *ZeRtasParallelOperationExpProperties, // pProperties [in,out] query result for parallel operation properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationGetPropertiesExp", uintptr(hParallelOperation), uintptr(unsafe.Pointer(pProperties)))
}
// ZeRTASParallelOperationJoinExp Joins a parallel build operation
///
/// @details
/// - All worker threads return the same error code for the parallel build
/// operation upon build completion
///
/// @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 == hParallelOperation`
func ZeRTASParallelOperationJoinExp(
hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationJoinExp", uintptr(hParallelOperation))
}
// ZeRTASParallelOperationDestroyExp Destroys a ray tracing acceleration structure builder parallel
/// operation object
///
/// @details
/// - The implementation of this function may immediately release any
/// internal Host and Device resources associated with this parallel
/// operation.
/// - The application must **not** call this function from simultaneous
/// threads with the same parallel operation 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 == hParallelOperation`
func ZeRTASParallelOperationDestroyExp(
hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeRTASParallelOperationDestroyExp", uintptr(hParallelOperation))
}

44
core/SRGB.go Normal file
View File

@@ -0,0 +1,44 @@
// 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 core
import (
"unsafe"
)
// ZE_SRGB_EXT_NAME sRGB Extension Name
const ZE_SRGB_EXT_NAME = "ZE_extension_srgb"
// ZeSrgbExtVersion (ze_srgb_ext_version_t) sRGB Extension Version(s)
type ZeSrgbExtVersion uintptr
const (
ZE_SRGB_EXT_VERSION_1_0 ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SRGB_EXT_VERSION_1_0 version 1.0
ZE_SRGB_EXT_VERSION_CURRENT ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SRGB_EXT_VERSION_CURRENT latest known version
ZE_SRGB_EXT_VERSION_FORCE_UINT32 ZeSrgbExtVersion = 0x7fffffff // ZE_SRGB_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs
)
// ZeSrgbExtDesc (ze_srgb_ext_desc_t) sRGB image descriptor
///
/// @details
/// - This structure may be passed to ::zeImageCreate via the `pNext` member
/// of ::ze_image_desc_t
/// - Used for specifying that the image is in sRGB format.
type ZeSrgbExtDesc 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).
Srgb ZeBool // Srgb [in] Is sRGB.
}

63
core/bandwidth.go Normal file
View File

@@ -0,0 +1,63 @@
// 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 core
import (
"unsafe"
)
// ZE_BANDWIDTH_PROPERTIES_EXP_NAME Bandwidth Extension Name
const ZE_BANDWIDTH_PROPERTIES_EXP_NAME = "ZE_experimental_bandwidth_properties"
// ZeBandwidthPropertiesExpVersion (ze_bandwidth_properties_exp_version_t) Bandwidth Extension Version(s)
type ZeBandwidthPropertiesExpVersion uintptr
const (
ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 version 1.0
ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT latest known version
ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeBandwidthPropertiesExpVersion = 0x7fffffff // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_* ENUMs
)
// ZeDeviceP2pBandwidthExpProperties (ze_device_p2p_bandwidth_exp_properties_t) P2P Bandwidth Properties
///
/// @details
/// - This structure may be passed to ::zeDeviceGetP2PProperties by having
/// the pNext member of ::ze_device_p2p_properties_t point at this struct.
type ZeDeviceP2pBandwidthExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Logicalbandwidth uint32 // Logicalbandwidth [out] total logical design bandwidth for all links connecting the two devices
Physicalbandwidth uint32 // Physicalbandwidth [out] total physical design bandwidth for all links connecting the two devices
Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit
Logicallatency uint32 // Logicallatency [out] average logical design latency for all links connecting the two devices
Physicallatency uint32 // Physicallatency [out] average physical design latency for all links connecting the two devices
Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit
}
// ZeCopyBandwidthExpProperties (ze_copy_bandwidth_exp_properties_t) Copy Bandwidth Properties
///
/// @details
/// - This structure may be passed to
/// ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of
/// ::ze_command_queue_group_properties_t point at this struct.
/// - [DEPRECATED]
type ZeCopyBandwidthExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Copybandwidth uint32 // Copybandwidth [out] design bandwidth supported by this engine type for copy operations
Copybandwidthunit ZeBandwidthUnit // Copybandwidthunit [out] copy bandwidth unit
}

View File

@@ -0,0 +1,27 @@
// 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 core
// ZE_BFLOAT16_CONVERSIONS_EXT_NAME Bfloat16 Conversions Extension Name
const ZE_BFLOAT16_CONVERSIONS_EXT_NAME = "ZE_extension_bfloat16_conversions"
// ZeBfloat16ConversionsExtVersion (ze_bfloat16_conversions_ext_version_t) Bfloat16 Conversions Extension Version(s)
type ZeBfloat16ConversionsExtVersion uintptr
const (
ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 version 1.0
ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT latest known version
ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 ZeBfloat16ConversionsExtVersion = 0x7fffffff // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs
)

180
core/bindlessimages.go Normal file
View File

@@ -0,0 +1,180 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_BINDLESS_IMAGE_EXP_NAME Image Memory Properties Extension Name
const ZE_BINDLESS_IMAGE_EXP_NAME = "ZE_experimental_bindless_image"
// ZeBindlessImageExpVersion (ze_bindless_image_exp_version_t) Bindless Image Extension Version(s)
type ZeBindlessImageExpVersion uintptr
const (
ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 version 1.0
ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT latest known version
ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 ZeBindlessImageExpVersion = 0x7fffffff // ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs
)
// ZeImageBindlessExpFlags (ze_image_bindless_exp_flags_t) Image flags for Bindless images
type ZeImageBindlessExpFlags uint32
const (
ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS ZeImageBindlessExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS Bindless images are created with ::zeImageCreate. The image handle
///< created with this flag is valid on both host and device.
ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE ZeImageBindlessExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE Bindless sampled images are created with ::zeImageCreate by combining
///< BINDLESS and SAMPLED_IMAGE.
///< Create sampled image view from bindless unsampled image using SAMPLED_IMAGE.
ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 ZeImageBindlessExpFlags = 0x7fffffff // ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs
)
// ZeImageBindlessExpDesc (ze_image_bindless_exp_desc_t) Image descriptor for bindless images. This structure may be passed to
/// ::zeImageCreate via pNext member of ::ze_image_desc_t.
type ZeImageBindlessExpDesc 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 ZeImageBindlessExpFlags // Flags [in] image flags. must be 0 (default) or a valid value of ::ze_image_bindless_exp_flag_t default behavior is bindless images are not used when creating handles via ::zeImageCreate. When the flag is passed to ::zeImageCreate, then only the memory for the image is allocated. Additional image handles can be created with ::zeImageViewCreateExt. When ::ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE flag is passed, ::ze_sampler_desc_t must be attached via pNext member of ::ze_image_bindless_exp_desc_t.
}
// ZeImagePitchedExpDesc (ze_image_pitched_exp_desc_t) Image descriptor for bindless images created from pitched allocations.
/// This structure may be passed to ::zeImageCreate via pNext member of
/// ::ze_image_desc_t.
type ZeImagePitchedExpDesc 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).
Ptr unsafe.Pointer // Ptr [in] pointer to pitched device allocation allocated using ::zeMemAllocDevice
}
// ZeDevicePitchedAllocExpProperties (ze_device_pitched_alloc_exp_properties_t) Device specific properties for pitched allocations
///
/// @details
/// - This structure may be passed to ::zeDeviceGetImageProperties via the
/// pNext member of ::ze_device_image_properties_t.
type ZeDevicePitchedAllocExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Maximagelinearwidth uintptr // Maximagelinearwidth [out] Maximum image linear width.
Maximagelinearheight uintptr // Maximagelinearheight [out] Maximum image linear height.
}
// ZePitchedAlloc2dimageLinearPitchExpInfo (ze_pitched_alloc_2dimage_linear_pitch_exp_info_t) Pitch information for 2-dimensional linear pitched allocations
///
/// @details
/// - This structure may be passed to ::zeDeviceGetImageProperties in
/// conjunction with the ::ze_device_pitched_alloc_exp_properties_t via
/// its pNext member
type ZePitchedAlloc2dimageLinearPitchExpInfo struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Pitchalign uintptr // Pitchalign [out] Required pitch Aligment in Bytes.
Maxsupportedpitch uintptr // Maxsupportedpitch [out] Maximum allowed pitch in Bytes.
}
// ZeMemGetPitchFor2dImage Retrieves pitch information that can be used to allocate USM memory
/// for a given image.
///
/// @details
/// - Retrieves pitch for 2D image given the width, height and size in bytes
/// - The memory is then allocated using ::zeMemAllocDevice by providing
/// input size calculated as the returned pitch value multiplied by image height
/// - The application may call this function from simultaneous threads
/// - The implementation of this function must be thread-safe.
/// - The implementation of this function should be lock-free.
/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME extension.
///
/// @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`
func ZeMemGetPitchFor2dImage(
hContext ZeContextHandle, // hContext [in] handle of the context object
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
imageWidth uintptr, // imageWidth [in] imageWidth
imageHeight uintptr, // imageHeight [in] imageHeight
elementSizeInBytes uint32, // elementSizeInBytes [in] Element size in bytes
rowPitch *uintptr, // rowPitch [out] rowPitch
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeMemGetPitchFor2dImage", uintptr(hContext), uintptr(hDevice), uintptr(imageWidth), uintptr(imageHeight), uintptr(elementSizeInBytes), uintptr(unsafe.Pointer(rowPitch)))
}
// ZeImageGetDeviceOffsetExp Get bindless device offset for image
///
/// @details
/// - The application may call this function from simultaneous threads
/// - The implementation of this function must be thread-safe.
/// - The implementation of this function should be lock-free.
/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME
/// extension.
///
/// @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 == hImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pDeviceOffset`
func ZeImageGetDeviceOffsetExp(
hImage ZeImageHandle, // hImage [in] handle of the image
pDeviceOffset *uint64, // pDeviceOffset [out] bindless device offset for image
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeImageGetDeviceOffsetExp", uintptr(hImage), uintptr(unsafe.Pointer(pDeviceOffset)))
}
// ZeCustomPitchExpDesc (ze_custom_pitch_exp_desc_t) Specify user defined pitch for pitched linear image allocations. This
/// structure may be passed to ::zeImageCreate in conjunction with
/// ::ze_image_pitched_exp_desc_t via its pNext member
type ZeCustomPitchExpDesc 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).
Rowpitch uintptr // Rowpitch [in] user programmed aligned pitch for pitched linear image allocations. This pitch should satisfy the pitchAlign requirement in ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t
Slicepitch uintptr // Slicepitch [in] user programmed slice pitch , must be multiple of rowPitch. For 2D image arrary or a slice of a 3D image array - this pitch should be >= rowPitch * image_height . For 1D iamge array >= rowPitch.
}

139
core/cacheReservation.go Normal file
View File

@@ -0,0 +1,139 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_CACHE_RESERVATION_EXT_NAME Cache_Reservation Extension Name
const ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation"
// ZeCacheReservationExtVersion (ze_cache_reservation_ext_version_t) Cache_Reservation Extension Version(s)
type ZeCacheReservationExtVersion uintptr
const (
ZE_CACHE_RESERVATION_EXT_VERSION_1_0 ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CACHE_RESERVATION_EXT_VERSION_1_0 version 1.0
ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT latest known version
ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 ZeCacheReservationExtVersion = 0x7fffffff // ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs
)
// ZeCacheExtRegion (ze_cache_ext_region_t) Cache Reservation Region
type ZeCacheExtRegion uintptr
const (
ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT [DEPRECATED] utilize driver default scheme. Use
///< ::ZE_CACHE_EXT_REGION_DEFAULT.
ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION [DEPRECATED] utilize reserved region. Use
///< ::ZE_CACHE_EXT_REGION_RESERVED.
ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION [DEPRECATED] utilize non-reserverd region. Use
///< ::ZE_CACHE_EXT_REGION_NON_RESERVED.
ZE_CACHE_EXT_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_DEFAULT utilize driver default scheme
ZE_CACHE_EXT_REGION_RESERVED ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_RESERVED utilize reserved region
ZE_CACHE_EXT_REGION_NON_RESERVED ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_NON_RESERVED utilize non-reserverd region
ZE_CACHE_EXT_REGION_FORCE_UINT32 ZeCacheExtRegion = 0x7fffffff // ZE_CACHE_EXT_REGION_FORCE_UINT32 Value marking end of ZE_CACHE_EXT_REGION_* ENUMs
)
// ZeCacheReservationExtDesc (ze_cache_reservation_ext_desc_t) CacheReservation structure
///
/// @details
/// - This structure must be passed to ::zeDeviceGetCacheProperties via the
/// `pNext` member of ::ze_device_cache_properties_t
/// - Used for determining the max cache reservation allowed on device. Size
/// of zero means no reservation available.
type ZeCacheReservationExtDesc 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).
Maxcachereservationsize uintptr // Maxcachereservationsize [out] max cache reservation size
}
// ZeDeviceReserveCacheExt Reserve Cache on Device
///
/// @details
/// - The application may call this function but may not be successful as
/// some other application may have reserve prior
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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 == hDevice`
func ZeDeviceReserveCacheExt(
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
cacheLevel uintptr, // cacheLevel [in] cache level where application want to reserve. If zero, then the driver shall default to last level of cache and attempt to reserve in that cache.
cacheReservationSize uintptr, // cacheReservationSize [in] value for reserving size, in bytes. If zero, then the driver shall remove prior reservation
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDeviceReserveCacheExt", uintptr(hDevice), uintptr(cacheLevel), uintptr(cacheReservationSize))
}
// ZeDeviceSetCacheAdviceExt Assign VA section to use reserved section
///
/// @details
/// - The application may call this function to assign VA to particular
/// reservartion region
///
/// @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 == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == ptr`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZE_CACHE_EXT_REGION_NON_RESERVED < cacheRegion`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeDeviceSetCacheAdviceExt(
hDevice ZeDeviceHandle, // hDevice [in] handle of the device object
ptr unsafe.Pointer, // ptr [in] memory pointer to query
regionSize uintptr, // regionSize [in] region size, in pages
cacheRegion ZeCacheExtRegion, // cacheRegion [in] reservation region
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDeviceSetCacheAdviceExt", uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(regionSize), uintptr(cacheRegion))
}

2305
core/callbacks.go Normal file

File diff suppressed because it is too large Load Diff

75
core/commandListClone.go Normal file
View File

@@ -0,0 +1,75 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_COMMAND_LIST_CLONE_EXP_NAME Command List Clone Extension Name
const ZE_COMMAND_LIST_CLONE_EXP_NAME = "ZE_experimental_command_list_clone"
// ZeCommandListCloneExpVersion (ze_command_list_clone_exp_version_t) Command List Clone Extension Version(s)
type ZeCommandListCloneExpVersion uintptr
const (
ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 version 1.0
ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT latest known version
ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 ZeCommandListCloneExpVersion = 0x7fffffff // ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs
)
// ZeCommandListCreateCloneExp Creates a command list as the clone of another command list.
///
/// @details
/// - The source command list must be created with the
/// ::ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE flag.
/// - The source command list must be closed prior to cloning.
/// - The source command list may be cloned while it is running on the
/// device.
/// - The cloned command list inherits all properties of the source command
/// list.
/// - The cloned command list must be destroyed prior to the source command
/// list.
/// - 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 == hCommandList`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phClonedCommandList`
func ZeCommandListCreateCloneExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle to source command list (the command list to clone)
phClonedCommandList *ZeCommandListHandle, // phClonedCommandList [out] pointer to handle of the cloned command list
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListCreateCloneExp", uintptr(hCommandList), uintptr(unsafe.Pointer(phClonedCommandList)))
}

View File

@@ -0,0 +1,50 @@
// 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 core
import (
"unsafe"
)
// ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME Counter-based Event Pools Extension Name
const ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME = "ZE_experimental_event_pool_counter_based"
// ZeEventPoolCounterBasedExpVersion (ze_event_pool_counter_based_exp_version_t) Counter-based Event Pools Extension Version(s)
type ZeEventPoolCounterBasedExpVersion uintptr
const (
ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 version 1.0
ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT latest known version
ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 ZeEventPoolCounterBasedExpVersion = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs
)
// ZeEventPoolCounterBasedExpFlags (ze_event_pool_counter_based_exp_flags_t) Supported event flags for defining counter-based event pools.
type ZeEventPoolCounterBasedExpFlags uint32
const (
ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE Counter-based event pool is used for immediate command lists (default)
ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE Counter-based event pool is for non-immediate command lists
ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 ZeEventPoolCounterBasedExpFlags = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs
)
// ZeEventPoolCounterBasedExpDesc (ze_event_pool_counter_based_exp_desc_t) Event pool descriptor for counter-based events. This structure may be
/// passed to ::zeEventPoolCreate as pNext member of
/// ::ze_event_pool_desc_t. @deprecated since 1.15
type ZeEventPoolCounterBasedExpDesc 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 ZeEventPoolCounterBasedExpFlags // Flags [in] mode flags. must be 0 (default) or a valid value of ::ze_event_pool_counter_based_exp_flag_t default behavior is counter-based event pool is only used for immediate command lists.
}

53
core/deviceLUID.go Normal file
View File

@@ -0,0 +1,53 @@
// 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 core
import (
"unsafe"
)
// ZE_DEVICE_LUID_EXT_NAME Device Local Identifier (LUID) Extension Name
const ZE_DEVICE_LUID_EXT_NAME = "ZE_extension_device_luid"
// ZeDeviceLuidExtVersion (ze_device_luid_ext_version_t) Device Local Identifier (LUID) Extension Version(s)
type ZeDeviceLuidExtVersion uintptr
const (
ZE_DEVICE_LUID_EXT_VERSION_1_0 ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_LUID_EXT_VERSION_1_0 version 1.0
ZE_DEVICE_LUID_EXT_VERSION_CURRENT ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_LUID_EXT_VERSION_CURRENT latest known version
ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 ZeDeviceLuidExtVersion = 0x7fffffff // ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs
)
// ZE_MAX_DEVICE_LUID_SIZE_EXT Maximum device local identifier (LUID) size in bytes
const ZE_MAX_DEVICE_LUID_SIZE_EXT = 8
// ZeDeviceLuidExt (ze_device_luid_ext_t) Device local identifier (LUID)
type ZeDeviceLuidExt struct {
Id [ZE_MAX_DEVICE_LUID_SIZE_EXT]uint8 // Id [out] opaque data representing a device LUID
}
// ZeDeviceLuidExtProperties (ze_device_luid_ext_properties_t) Device LUID properties queried using ::zeDeviceGetProperties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetProperties, via the
/// `pNext` member of ::ze_device_properties_t.
type ZeDeviceLuidExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Luid ZeDeviceLuidExt // Luid [out] locally unique identifier (LUID). The returned LUID can be cast to a LUID object and must be equal to the locally unique identifier of an IDXGIAdapter1 object that corresponds to the device.
Nodemask uint32 // Nodemask [out] node mask. The returned node mask must contain exactly one bit. If the device is running on an operating system that supports the Direct3D 12 API and the device corresponds to an individual device in a linked device adapter, the returned node mask identifies the Direct3D 12 node corresponding to the device. Otherwise, the returned node mask must be 1.
}

96
core/deviceVectorSizes.go Normal file
View File

@@ -0,0 +1,96 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_DEVICE_VECTOR_SIZES_EXT_NAME Device Vector Sizes Query Extension Name
const ZE_DEVICE_VECTOR_SIZES_EXT_NAME = "ZE_extension_device_vector_sizes"
// ZeDeviceVectorSizesExtVersion (ze_device_vector_sizes_ext_version_t) Device Vector Sizes Query Extension Version(s)
type ZeDeviceVectorSizesExtVersion uintptr
const (
ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 version 1.0
ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT latest known version
ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 ZeDeviceVectorSizesExtVersion = 0x7fffffff // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs
)
// ZeDeviceVectorWidthPropertiesExt (ze_device_vector_width_properties_ext_t) Device Vector Width Properties queried using
/// $DeviceGetVectorWidthPropertiesExt
type ZeDeviceVectorWidthPropertiesExt struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
VectorWidthSize uint32 // VectorWidthSize [out] The associated vector width size supported by the device.
PreferredVectorWidthChar uint32 // PreferredVectorWidthChar [out] The preferred vector width size for char type supported by the device.
PreferredVectorWidthShort uint32 // PreferredVectorWidthShort [out] The preferred vector width size for short type supported by the device.
PreferredVectorWidthInt uint32 // PreferredVectorWidthInt [out] The preferred vector width size for int type supported by the device.
PreferredVectorWidthLong uint32 // PreferredVectorWidthLong [out] The preferred vector width size for long type supported by the device.
PreferredVectorWidthFloat uint32 // PreferredVectorWidthFloat [out] The preferred vector width size for float type supported by the device.
PreferredVectorWidthDouble uint32 // PreferredVectorWidthDouble [out] The preferred vector width size for double type supported by the device.
PreferredVectorWidthHalf uint32 // PreferredVectorWidthHalf [out] The preferred vector width size for half type supported by the device.
NativeVectorWidthChar uint32 // NativeVectorWidthChar [out] The native vector width size for char type supported by the device.
NativeVectorWidthShort uint32 // NativeVectorWidthShort [out] The native vector width size for short type supported by the device.
NativeVectorWidthInt uint32 // NativeVectorWidthInt [out] The native vector width size for int type supported by the device.
NativeVectorWidthLong uint32 // NativeVectorWidthLong [out] The native vector width size for long type supported by the device.
NativeVectorWidthFloat uint32 // NativeVectorWidthFloat [out] The native vector width size for float type supported by the device.
NativeVectorWidthDouble uint32 // NativeVectorWidthDouble [out] The native vector width size for double type supported by the device.
NativeVectorWidthHalf uint32 // NativeVectorWidthHalf [out] The native vector width size for half type supported by the device.
}
// ZeDeviceGetVectorWidthPropertiesExt Retrieves the vector width properties of the device.
///
/// @details
/// - Properties are reported for each vector width supported by the device.
/// - Multiple calls to this function will return properties in the same
/// order.
/// - The number of vector width properties is reported thru the pCount
/// parameter which is updated by the driver given pCount == 0.
/// - The application may provide a buffer that is larger than the number of
/// properties, but the application must set pCount to the number of
/// properties to retrieve.
/// - 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 == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeDeviceGetVectorWidthPropertiesExt(
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
pCount *uint32, // pCount [in,out] pointer to the number of vector width properties. if count is zero, then the driver shall update the value with the total number of vector width properties available. if count is greater than the number of vector width properties available, then the driver shall update the value with the correct number of vector width properties available.
pVectorWidthProperties *ZeDeviceVectorWidthPropertiesExt, // pVectorWidthProperties [in,out][optional][range(0, *pCount)] array of vector width properties. if count is less than the number of properties available, then the driver will return only the number requested.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDeviceGetVectorWidthPropertiesExt", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pVectorWidthProperties)))
}

43
core/deviceipversion.go Normal file
View File

@@ -0,0 +1,43 @@
// 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 core
import (
"unsafe"
)
// ZE_DEVICE_IP_VERSION_EXT_NAME Device IP Version Extension Name
const ZE_DEVICE_IP_VERSION_EXT_NAME = "ZE_extension_device_ip_version"
// ZeDeviceIpVersionVersion (ze_device_ip_version_version_t) Device IP Version Extension Version(s)
type ZeDeviceIpVersionVersion uintptr
const (
ZE_DEVICE_IP_VERSION_VERSION_1_0 ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_IP_VERSION_VERSION_1_0 version 1.0
ZE_DEVICE_IP_VERSION_VERSION_CURRENT ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_IP_VERSION_VERSION_CURRENT latest known version
ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 ZeDeviceIpVersionVersion = 0x7fffffff // ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs
)
// ZeDeviceIpVersionExt (ze_device_ip_version_ext_t) Device IP version queried using ::zeDeviceGetProperties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetProperties via the
/// `pNext` member of ::ze_device_properties_t
type ZeDeviceIpVersionExt 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).
Ipversion uint32 // Ipversion [out] Device IP version. The meaning of the device IP version is implementation-defined, but newer devices should have a higher version than older devices.
}

View File

@@ -0,0 +1,43 @@
// 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 core
import (
"unsafe"
)
// ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME Device Usable Memory Size Properties Extension Name
const ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_device_usablemem_size_properties"
// ZeDeviceUsablememSizePropertiesExtVersion (ze_device_usablemem_size_properties_ext_version_t) Device Usable Mem Size Extension Version(s)
type ZeDeviceUsablememSizePropertiesExtVersion uintptr
const (
ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0
ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version
ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceUsablememSizePropertiesExtVersion = 0x7fffffff // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_* ENUMs
)
// ZeDeviceUsablememSizeExtProperties (ze_device_usablemem_size_ext_properties_t) Memory access property to discover current status of usable memory
///
/// @details
/// - This structure may be returned from ::zeDeviceGetProperties via the
/// `pNext` member of ::ze_device_properties_t
type ZeDeviceUsablememSizeExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Currusablememsize uint64 // Currusablememsize [out] Returns the available usable memory at the device level. This is typically less than or equal to the available physical memory on the device. It important to note that usable memory size reported is transient in nature and cannot be used to reliably guarentee success of future allocations. The usable memory includes all the memory that the clients can allocate for their use and by L0 Core for its internal allocations.
}

View File

@@ -0,0 +1,129 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME Event Query Kernel Timestamps Extension Name
const ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kernel_timestamps"
// ZeEventQueryKernelTimestampsExtVersion (ze_event_query_kernel_timestamps_ext_version_t) Event Query Kernel Timestamps Extension Version(s)
type ZeEventQueryKernelTimestampsExtVersion uintptr
const (
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 version 1.0
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT latest known version
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 ZeEventQueryKernelTimestampsExtVersion = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs
)
// ZeEventQueryKernelTimestampsExtFlags (ze_event_query_kernel_timestamps_ext_flags_t) Event query kernel timestamps flags
type ZeEventQueryKernelTimestampsExtFlags uint32
const (
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL Kernel timestamp results
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED Device event timestamps synchronized to the host time domain
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 ZeEventQueryKernelTimestampsExtFlags = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs
)
// ZeEventQueryKernelTimestampsExtProperties (ze_event_query_kernel_timestamps_ext_properties_t) Event query kernel timestamps properties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetProperties, via the
/// `pNext` member of ::ze_device_properties_t.
type ZeEventQueryKernelTimestampsExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Flags ZeEventQueryKernelTimestampsExtFlags // Flags [out] 0 or some combination of ::ze_event_query_kernel_timestamps_ext_flag_t flags
}
// ZeSynchronizedTimestampDataExt (ze_synchronized_timestamp_data_ext_t) Kernel timestamp clock data synchronized to the host time domain
type ZeSynchronizedTimestampDataExt struct {
Kernelstart uint64 // Kernelstart [out] synchronized clock at start of kernel execution
Kernelend uint64 // Kernelend [out] synchronized clock at end of kernel execution
}
// ZeSynchronizedTimestampResultExt (ze_synchronized_timestamp_result_ext_t) Synchronized kernel timestamp result
type ZeSynchronizedTimestampResultExt struct {
Global ZeSynchronizedTimestampDataExt // Global [out] wall-clock data
Context ZeSynchronizedTimestampDataExt // Context [out] context-active data; only includes clocks while device context was actively executing.
}
// ZeEventQueryKernelTimestampsResultsExtProperties (ze_event_query_kernel_timestamps_results_ext_properties_t) Event query kernel timestamps results properties
type ZeEventQueryKernelTimestampsResultsExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Pkerneltimestampsbuffer *ZeKernelTimestampResult // Pkerneltimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of kernel timestamp results
Psynchronizedtimestampsbuffer *ZeSynchronizedTimestampResultExt // Psynchronizedtimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of synchronized timestamp results
}
// ZeEventQueryKernelTimestampsExt Query an event's timestamp value on the host, with domain preference.
///
/// @details
/// - For collecting *only* kernel timestamps, the application must ensure
/// the event was created from an event pool that was created using
/// ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag.
/// - For collecting synchronized timestamps, the application must ensure
/// the event was created from an event pool that was created using
/// ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. Kernel timestamps
/// are also available from this type of event pool, but there is a
/// performance cost.
/// - 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 must be thread-safe.
/// - The implementation must support
/// ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension.
/// - The implementation must return all timestamps for the specified event
/// and device pair.
/// - The implementation must return all timestamps for all sub-devices when
/// device handle is parent device.
/// - The implementation may return all timestamps for sub-devices when
/// device handle is sub-device or may return 0 for count.
///
/// @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`
/// + `nullptr == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeEventQueryKernelTimestampsExt(
hEvent ZeEventHandle, // hEvent [in] handle of the event
hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query
pCount *uint32, // pCount [in,out] pointer to the number of event packets available. - This value is implementation specific. - if `*pCount` is zero, then the driver shall update the value with the total number of event packets available. - if `*pCount` is greater than the number of event packets available, the driver shall update the value with the correct value. - Buffer(s) for query results must be sized by the application to accommodate a minimum of `*pCount` elements.
pResults *ZeEventQueryKernelTimestampsResultsExtProperties, // pResults [in,out][optional][range(0, *pCount)] pointer to event query properties structure(s). - This parameter may be null when `*pCount` is zero. - if `*pCount` is less than the number of event packets available, the driver may only update `*pCount` elements, starting at element zero. - if `*pCount` is greater than the number of event packets available, the driver may only update the valid elements.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeEventQueryKernelTimestampsExt", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pResults)))
}

View File

@@ -0,0 +1,79 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME Event Query Timestamps Extension Name
const ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestamps"
// ZeEventQueryTimestampsExpVersion (ze_event_query_timestamps_exp_version_t) Event Query Timestamps Extension Version(s)
type ZeEventQueryTimestampsExpVersion uintptr
const (
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 version 1.0
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT latest known version
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeEventQueryTimestampsExpVersion = 0x7fffffff // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs
)
// ZeEventQueryTimestampsExp Query event timestamps for a device or sub-device.
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME
/// extension.
/// - The implementation must return all timestamps for the specified event
/// and device pair.
/// - The implementation must return all timestamps for all sub-devices when
/// device handle is parent device.
/// - The implementation may return all timestamps for sub-devices when
/// device handle is sub-device or may return 0 for count.
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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`
/// + `nullptr == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeEventQueryTimestampsExp(
hEvent ZeEventHandle, // hEvent [in] handle of the event
hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query
pCount *uint32, // pCount [in,out] pointer to the number of timestamp results. if count is zero, then the driver shall update the value with the total number of timestamps available. if count is greater than the number of timestamps available, then the driver shall update the value with the correct number of timestamps available.
pTimestamps *ZeKernelTimestampResult, // pTimestamps [in,out][optional][range(0, *pCount)] array of timestamp results. if count is less than the number of timestamps available, then driver shall only retrieve that number of timestamps.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeEventQueryTimestampsExp", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pTimestamps)))
}

47
core/externalMemMap.go Normal file
View File

@@ -0,0 +1,47 @@
// 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 core
import (
"unsafe"
)
// ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME External Memory Mapping Extension Name
const ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME = "ZE_extension_external_memmap_sysmem"
// ZeExternalMemmapSysmemExtVersion (ze_external_memmap_sysmem_ext_version_t) External Memory Mapping Extension Version(s)
type ZeExternalMemmapSysmemExtVersion uintptr
const (
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 version 1.0
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT latest known version
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 ZeExternalMemmapSysmemExtVersion = 0x7fffffff // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs
)
// ZeExternalMemmapSysmemExtDesc (ze_external_memmap_sysmem_ext_desc_t) Maps external system memory for an allocation
///
/// @details
/// - This structure may be passed to ::zeMemAllocHost, via the `pNext`
/// member of ::ze_host_mem_alloc_desc_t to map system memory for a host
/// allocation.
/// - The system memory pointer and size being mapped must be page aligned
/// based on the supported page sizes on the device.
type ZeExternalMemmapSysmemExtDesc 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).
Psystemmemory unsafe.Pointer // Psystemmemory [in] system memory pointer to map; must be page-aligned.
Size uint64 // Size [in] size of the system memory to map; must be page-aligned.
}

372
core/fabric.go Normal file
View File

@@ -0,0 +1,372 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_FABRIC_EXP_NAME Fabric Topology Discovery Extension Name
const ZE_FABRIC_EXP_NAME = "ZE_experimental_fabric"
// ZeFabricExpVersion (ze_fabric_exp_version_t) Fabric Topology Discovery Extension Version(s)
type ZeFabricExpVersion uintptr
const (
ZE_FABRIC_EXP_VERSION_1_0 ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FABRIC_EXP_VERSION_1_0 version 1.0
ZE_FABRIC_EXP_VERSION_CURRENT ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FABRIC_EXP_VERSION_CURRENT latest known version
ZE_FABRIC_EXP_VERSION_FORCE_UINT32 ZeFabricExpVersion = 0x7fffffff // ZE_FABRIC_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_FABRIC_EXP_VERSION_* ENUMs
)
// ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE Maximum fabric edge model string size
const ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE = 256
// ZeFabricVertexExpType (ze_fabric_vertex_exp_type_t) Fabric Vertex types
type ZeFabricVertexExpType uintptr
const (
ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN ZeFabricVertexExpType = 0 // ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN Fabric vertex type is unknown
ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE ZeFabricVertexExpType = 1 // ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE Fabric vertex represents a device
ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE ZeFabricVertexExpType = 2 // ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE Fabric vertex represents a subdevice
ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH ZeFabricVertexExpType = 3 // ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH Fabric vertex represents a switch
ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 ZeFabricVertexExpType = 0x7fffffff // ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs
)
// ZeFabricEdgeExpDuplexity (ze_fabric_edge_exp_duplexity_t) Fabric edge duplexity
type ZeFabricEdgeExpDuplexity uintptr
const (
ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN ZeFabricEdgeExpDuplexity = 0 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN Fabric edge duplexity is unknown
ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX ZeFabricEdgeExpDuplexity = 1 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX Fabric edge is half duplex, i.e. stated bandwidth is obtained in only
///< one direction at time
ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX ZeFabricEdgeExpDuplexity = 2 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX Fabric edge is full duplex, i.e. stated bandwidth is supported in both
///< directions simultaneously
ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 ZeFabricEdgeExpDuplexity = 0x7fffffff // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs
)
// ZeFabricVertexPciExpAddress (ze_fabric_vertex_pci_exp_address_t) PCI address
///
/// @details
/// - A PCI BDF address is the bus:device:function address of the device and
/// is useful for locating the device in the PCI switch fabric.
type ZeFabricVertexPciExpAddress struct {
Domain uint32 // Domain [out] PCI domain number
Bus uint32 // Bus [out] PCI BDF bus number
Device uint32 // Device [out] PCI BDF device number
Function uint32 // Function [out] PCI BDF function number
}
// ZeFabricVertexExpProperties (ze_fabric_vertex_exp_properties_t) Fabric Vertex properties
type ZeFabricVertexExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Uuid ZeUuid // Uuid [out] universal unique identifier. If the vertex is co-located with a device/subdevice, then this uuid will match that of the corresponding device/subdevice
Type ZeFabricVertexExpType // Type [out] does the fabric vertex represent a device, subdevice, or switch?
Remote ZeBool // Remote [out] does the fabric vertex live on the local node or on a remote node?
Address ZeFabricVertexPciExpAddress // Address [out] B/D/F address of fabric vertex & associated device/subdevice if available
}
// ZeFabricEdgeExpProperties (ze_fabric_edge_exp_properties_t) Fabric Edge properties
type ZeFabricEdgeExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Uuid ZeUuid // Uuid [out] universal unique identifier.
Model [ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE]byte // Model [out] Description of fabric edge technology. Will be set to the string "unkown" if this cannot be determined for this edge
Bandwidth uint32 // Bandwidth [out] design bandwidth
Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit
Latency uint32 // Latency [out] design latency
Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit
Duplexity ZeFabricEdgeExpDuplexity // Duplexity [out] Duplexity of the fabric edge
}
// ZeFabricVertexGetExp Retrieves fabric vertices within a driver
///
/// @details
/// - A fabric vertex represents either a device or a switch connected to
/// other fabric vertices.
/// - 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 == hDriver`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeFabricVertexGetExp(
hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance
pCount *uint32, // pCount [in,out] pointer to the number of fabric vertices. if count is zero, then the driver shall update the value with the total number of fabric vertices available. if count is greater than the number of fabric vertices available, then the driver shall update the value with the correct number of fabric vertices available.
phVertices *ZeFabricVertexHandle, // phVertices [in,out][optional][range(0, *pCount)] array of handle of fabric vertices. if count is less than the number of fabric vertices available, then driver shall only retrieve that number of fabric vertices.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricVertexGetExp", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phVertices)))
}
// ZeFabricVertexGetSubVerticesExp Retrieves a fabric sub-vertex from a fabric vertex
///
/// @details
/// - Multiple calls to this function will return identical fabric vertex
/// handles, in the same order.
/// - The number of handles returned from this function is affected by the
/// `ZE_AFFINITY_MASK` environment variable.
/// - 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 == hVertex`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeFabricVertexGetSubVerticesExp(
hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex object
pCount *uint32, // pCount [in,out] pointer to the number of sub-vertices. if count is zero, then the driver shall update the value with the total number of sub-vertices available. if count is greater than the number of sub-vertices available, then the driver shall update the value with the correct number of sub-vertices available.
phSubvertices *ZeFabricVertexHandle, // phSubvertices [in,out][optional][range(0, *pCount)] array of handle of sub-vertices. if count is less than the number of sub-vertices available, then driver shall only retrieve that number of sub-vertices.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricVertexGetSubVerticesExp", uintptr(hVertex), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phSubvertices)))
}
// ZeFabricVertexGetPropertiesExp Retrieves properties of the fabric vertex.
///
/// @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 == hVertex`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pVertexProperties`
func ZeFabricVertexGetPropertiesExp(
hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex
pVertexProperties *ZeFabricVertexExpProperties, // pVertexProperties [in,out] query result for fabric vertex properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricVertexGetPropertiesExp", uintptr(hVertex), uintptr(unsafe.Pointer(pVertexProperties)))
}
// ZeFabricVertexGetDeviceExp Returns device handle from fabric vertex handle.
///
/// @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 == hVertex`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phDevice`
/// - ::ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE
/// + Provided fabric vertex handle does not correspond to a device or subdevice.
/// - ::ZE_RESULT_EXP_ERROR_REMOTE_DEVICE
/// + Provided fabric vertex handle corresponds to remote device or subdevice.
func ZeFabricVertexGetDeviceExp(
hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex
phDevice *ZeDeviceHandle, // phDevice [out] device handle corresponding to fabric vertex
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricVertexGetDeviceExp", uintptr(hVertex), uintptr(unsafe.Pointer(phDevice)))
}
// ZeDeviceGetFabricVertexExp Returns fabric vertex handle from device handle.
///
/// @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 == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phVertex`
/// - ::ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX
/// + Provided device handle does not correspond to a fabric vertex.
func ZeDeviceGetFabricVertexExp(
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
phVertex *ZeFabricVertexHandle, // phVertex [out] fabric vertex handle corresponding to device
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeDeviceGetFabricVertexExp", uintptr(hDevice), uintptr(unsafe.Pointer(phVertex)))
}
// ZeFabricEdgeGetExp Retrieves all fabric edges between provided pair of fabric vertices
///
/// @details
/// - A fabric edge represents one or more physical links between two fabric
/// vertices.
/// - 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 == hVertexA`
/// + `nullptr == hVertexB`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeFabricEdgeGetExp(
hVertexA ZeFabricVertexHandle, // hVertexA [in] handle of first fabric vertex instance
hVertexB ZeFabricVertexHandle, // hVertexB [in] handle of second fabric vertex instance
pCount *uint32, // pCount [in,out] pointer to the number of fabric edges. if count is zero, then the driver shall update the value with the total number of fabric edges available. if count is greater than the number of fabric edges available, then the driver shall update the value with the correct number of fabric edges available.
phEdges *ZeFabricEdgeHandle, // phEdges [in,out][optional][range(0, *pCount)] array of handle of fabric edges. if count is less than the number of fabric edges available, then driver shall only retrieve that number of fabric edges.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricEdgeGetExp", uintptr(hVertexA), uintptr(hVertexB), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phEdges)))
}
// ZeFabricEdgeGetVerticesExp Retrieves fabric vertices connected by a fabric edge
///
/// @details
/// - A fabric vertex represents either a device or a switch connected to
/// other fabric vertices via a fabric edge.
/// - 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 == hEdge`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phVertexA`
/// + `nullptr == phVertexB`
func ZeFabricEdgeGetVerticesExp(
hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge instance
phVertexA *ZeFabricVertexHandle, // phVertexA [out] fabric vertex connected to one end of the given fabric edge.
phVertexB *ZeFabricVertexHandle, // phVertexB [out] fabric vertex connected to other end of the given fabric edge.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricEdgeGetVerticesExp", uintptr(hEdge), uintptr(unsafe.Pointer(phVertexA)), uintptr(unsafe.Pointer(phVertexB)))
}
// ZeFabricEdgeGetPropertiesExp Retrieves properties of the fabric edge.
///
/// @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 == hEdge`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pEdgeProperties`
func ZeFabricEdgeGetPropertiesExp(
hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge
pEdgeProperties *ZeFabricEdgeExpProperties, // pEdgeProperties [in,out] query result for fabric edge properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeFabricEdgeGetPropertiesExp", uintptr(hEdge), uintptr(unsafe.Pointer(pEdgeProperties)))
}

169
core/imageCopy.go Normal file
View File

@@ -0,0 +1,169 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IMAGE_COPY_EXT_NAME Image Copy Extension Name
const ZE_IMAGE_COPY_EXT_NAME = "ZE_extension_image_copy"
// ZeImageCopyExtVersion (ze_image_copy_ext_version_t) Image Copy Extension Version(s)
type ZeImageCopyExtVersion uintptr
const (
ZE_IMAGE_COPY_EXT_VERSION_1_0 ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_COPY_EXT_VERSION_1_0 version 1.0
ZE_IMAGE_COPY_EXT_VERSION_CURRENT ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_COPY_EXT_VERSION_CURRENT latest known version
ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 ZeImageCopyExtVersion = 0x7fffffff // ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs
)
// ZeCommandListAppendImageCopyToMemoryExt Copies from an image to device or shared memory.
///
/// @details
/// - The application must ensure the memory pointed to by dstptr is
/// accessible by the device on which the command list was created.
/// - The implementation must not access the memory pointed to by dstptr as
/// it is free to be modified by either the Host or device up until
/// execution.
/// - The application must ensure the image and events are accessible by the
/// device on which the command list was created.
/// - The application must ensure the image format descriptor for the source
/// image is a single-planar format.
/// - The application must ensure that the rowPitch is set to 0 if image is
/// a 1D image. Otherwise the rowPitch must be greater than or equal to
/// the element size in bytes x width.
/// - If rowPitch is set to 0, the appropriate row pitch is calculated based
/// on the size of each element in bytes multiplied by width
/// - The application must ensure that the slicePitch is set to 0 if image
/// is a 1D or 2D image. Otherwise this value must be greater than or
/// equal to rowPitch x height.
/// - If slicePitch is set to 0, the appropriate slice pitch is calculated
/// based on the rowPitch x height.
/// - The application must ensure the command list, image 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.
///
/// @remarks
/// _Analogues_
/// - clEnqueueReadImage
///
/// @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 == hSrcImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == dstptr`
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
func ZeCommandListAppendImageCopyToMemoryExt(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list
dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to
hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from
pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor
destRowPitch uint32, // destRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being written
destSlicePitch uint32, // destSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written
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 launching; must be 0 if `nullptr == phWaitEvents`
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListAppendImageCopyToMemoryExt", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hSrcImage), uintptr(unsafe.Pointer(pSrcRegion)), uintptr(destRowPitch), uintptr(destSlicePitch), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}
// ZeCommandListAppendImageCopyFromMemoryExt Copies to an image from device or shared memory.
///
/// @details
/// - The application must ensure the memory pointed to by srcptr is
/// accessible by the device on which the command list was created.
/// - The implementation must not access the memory pointed to by srcptr as
/// it is free to be modified by either the Host or device up until
/// execution.
/// - The application must ensure the image and events are accessible by the
/// device on which the command list was created.
/// - The application must ensure the image format descriptor for the
/// destination image is a single-planar format.
/// - The application must ensure that the rowPitch is set to 0 if image is
/// a 1D image. Otherwise the rowPitch must be greater than or equal to
/// the element size in bytes x width.
/// - If rowPitch is set to 0, the appropriate row pitch is calculated based
/// on the size of each element in bytes multiplied by width
/// - The application must ensure that the slicePitch is set to 0 if image
/// is a 1D or 2D image. Otherwise this value must be greater than or
/// equal to rowPitch x height.
/// - If slicePitch is set to 0, the appropriate slice pitch is calculated
/// based on the rowPitch x height.
/// - The application must ensure the command list, image 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.
///
/// @remarks
/// _Analogues_
/// - clEnqueueWriteImage
///
/// @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 == hDstImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == srcptr`
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
func ZeCommandListAppendImageCopyFromMemoryExt(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list
hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to
srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from
pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor
srcRowPitch uint32, // srcRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being read
srcSlicePitch uint32, // srcSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read
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 launching; must be 0 if `nullptr == phWaitEvents`
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListAppendImageCopyFromMemoryExt", uintptr(hCommandList), uintptr(hDstImage), uintptr(unsafe.Pointer(srcptr)), uintptr(unsafe.Pointer(pDstRegion)), uintptr(srcRowPitch), uintptr(srcSlicePitch), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}

View File

@@ -0,0 +1,48 @@
// 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 core
import (
"unsafe"
)
// ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME Image Format Support Extension Name
const ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME = "ZE_extension_image_format_support"
// ZeImageFormatSupportExtVersion (ze_image_format_support_ext_version_t) Image Format Support Extension Version(s)
type ZeImageFormatSupportExtVersion uintptr
const (
ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 version 1.0
ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT latest known version
ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 ZeImageFormatSupportExtVersion = 0x7fffffff // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_* ENUMs
)
// ZeImageFormatSupportExtProperties (ze_image_format_support_ext_properties_t) Image format support query properties
///
/// @details
/// - This structure may be passed to ::zeImageGetProperties via the pNext
/// member of ::ze_image_properties_t.
/// - The implementation shall populate the supported field based on the
/// ::ze_image_desc_t and ::ze_device_handle_t passed to
/// ::zeImageGetProperties.
/// - This provides a mechanism to query format support without requiring
/// image creation.
type ZeImageFormatSupportExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Supported ZeBool // Supported [out] boolean flag indicating whether the image format is supported on the queried device
}

View File

@@ -0,0 +1,74 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME Image Query Allocation Properties Extension Name
const ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME = "ZE_extension_image_query_alloc_properties"
// ZeImageQueryAllocPropertiesExtVersion (ze_image_query_alloc_properties_ext_version_t) Image Query Allocation Properties Extension Version(s)
type ZeImageQueryAllocPropertiesExtVersion uintptr
const (
ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 version 1.0
ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT latest known version
ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeImageQueryAllocPropertiesExtVersion = 0x7fffffff // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs
)
// ZeImageAllocationExtProperties (ze_image_allocation_ext_properties_t) Image allocation properties queried using
/// ::zeImageGetAllocPropertiesExt
type ZeImageAllocationExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Id uint64 // Id [out] identifier for this allocation
}
// ZeImageGetAllocPropertiesExt Retrieves attributes of an image allocation
///
/// @details
/// - 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`
/// + `nullptr == hImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pImageAllocProperties`
func ZeImageGetAllocPropertiesExt(
hContext ZeContextHandle, // hContext [in] handle of the context object
hImage ZeImageHandle, // hImage [in] handle of image object to query
pImageAllocProperties *ZeImageAllocationExtProperties, // pImageAllocProperties [in,out] query result for image allocation properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeImageGetAllocPropertiesExt", uintptr(hContext), uintptr(hImage), uintptr(unsafe.Pointer(pImageAllocProperties)))
}

View File

@@ -0,0 +1,80 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME Image Memory Properties Extension Name
const ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME = "ZE_experimental_image_memory_properties"
// ZeImageMemoryPropertiesExpVersion (ze_image_memory_properties_exp_version_t) Image Memory Properties Extension Version(s)
type ZeImageMemoryPropertiesExpVersion uintptr
const (
ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 version 1.0
ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT latest known version
ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeImageMemoryPropertiesExpVersion = 0x7fffffff // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs
)
// ZeImageMemoryPropertiesExp (ze_image_memory_properties_exp_t) Image memory properties
type ZeImageMemoryPropertiesExp 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).
Size uint64 // Size [out] size of image allocation in bytes.
Rowpitch uint64 // Rowpitch [out] size of image row in bytes.
Slicepitch uint64 // Slicepitch [out] size of image slice in bytes.
}
// ZeImageGetMemoryPropertiesExp Query image memory properties.
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
/// - The implementation must support ::ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME
/// extension.
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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 == hImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pMemoryProperties`
func ZeImageGetMemoryPropertiesExp(
hImage ZeImageHandle, // hImage [in] handle of image object
pMemoryProperties *ZeImageMemoryPropertiesExp, // pMemoryProperties [in,out] query result for image memory properties.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeImageGetMemoryPropertiesExp", uintptr(hImage), uintptr(unsafe.Pointer(pMemoryProperties)))
}

157
core/imageview.go Normal file
View File

@@ -0,0 +1,157 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IMAGE_VIEW_EXT_NAME Image View Extension Name
const ZE_IMAGE_VIEW_EXT_NAME = "ZE_extension_image_view"
// ZeImageViewExtVersion (ze_image_view_ext_version_t) Image View Extension Version(s)
type ZeImageViewExtVersion uintptr
const (
ZE_IMAGE_VIEW_EXT_VERSION_1_0 ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXT_VERSION_1_0 version 1.0
ZE_IMAGE_VIEW_EXT_VERSION_CURRENT ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXT_VERSION_CURRENT latest known version
ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 ZeImageViewExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs
)
// ZeImageViewCreateExt Create image view on the context.
///
/// @details
/// - The application must only use the image view 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.
/// - The implementation must support ::ZE_IMAGE_VIEW_EXT_NAME extension.
/// - Image views are treated as images from the API.
/// - Image views provide a mechanism to redescribe how an image is
/// interpreted (e.g. different format).
/// - Image views become disabled when their corresponding image resource is
/// destroyed.
/// - Use ::zeImageDestroy to destroy image view objects.
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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`
/// + `nullptr == hImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == desc`
/// + `nullptr == phImageView`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x3 < desc->flags`
/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT
func ZeImageViewCreateExt(
hContext ZeContextHandle, // hContext [in] handle of the context object
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
desc *ZeImageDesc, // desc [in] pointer to image descriptor
hImage ZeImageHandle, // hImage [in] handle of image object to create view from
phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeImageViewCreateExt", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(hImage), uintptr(unsafe.Pointer(phImageView)))
}
// ZE_IMAGE_VIEW_EXP_NAME Image View Extension Name
const ZE_IMAGE_VIEW_EXP_NAME = "ZE_experimental_image_view"
// ZeImageViewExpVersion (ze_image_view_exp_version_t) Image View Extension Version(s)
type ZeImageViewExpVersion uintptr
const (
ZE_IMAGE_VIEW_EXP_VERSION_1_0 ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXP_VERSION_1_0 version 1.0
ZE_IMAGE_VIEW_EXP_VERSION_CURRENT ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXP_VERSION_CURRENT latest known version
ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 ZeImageViewExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs
)
// ZeImageViewCreateExp Create image view on the context.
///
/// @details
/// - The application must only use the image view 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.
/// - The implementation must support ::ZE_IMAGE_VIEW_EXP_NAME extension.
/// - Image views are treated as images from the API.
/// - Image views provide a mechanism to redescribe how an image is
/// interpreted (e.g. different format).
/// - Image views become disabled when their corresponding image resource is
/// destroyed.
/// - Use ::zeImageDestroy to destroy image view objects.
/// - Note: This function is deprecated and replaced by
/// ::zeImageViewCreateExt.
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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`
/// + `nullptr == hImage`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == desc`
/// + `nullptr == phImageView`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x3 < desc->flags`
/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT
func ZeImageViewCreateExp(
hContext ZeContextHandle, // hContext [in] handle of the context object
hDevice ZeDeviceHandle, // hDevice [in] handle of the device
desc *ZeImageDesc, // desc [in] pointer to image descriptor
hImage ZeImageHandle, // hImage [in] handle of image object to create view from
phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeImageViewCreateExp", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(hImage), uintptr(unsafe.Pointer(phImageView)))
}

59
core/imageviewplanar.go Normal file
View File

@@ -0,0 +1,59 @@
// 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 core
import (
"unsafe"
)
// ZE_IMAGE_VIEW_PLANAR_EXT_NAME Image View Planar Extension Name
const ZE_IMAGE_VIEW_PLANAR_EXT_NAME = "ZE_extension_image_view_planar"
// ZeImageViewPlanarExtVersion (ze_image_view_planar_ext_version_t) Image View Planar Extension Version(s)
type ZeImageViewPlanarExtVersion uintptr
const (
ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 version 1.0
ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT latest known version
ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 ZeImageViewPlanarExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs
)
// ZeImageViewPlanarExtDesc (ze_image_view_planar_ext_desc_t) Image view planar descriptor
type ZeImageViewPlanarExtDesc 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).
Planeindex uint32 // Planeindex [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane)
}
// ZE_IMAGE_VIEW_PLANAR_EXP_NAME Image View Planar Extension Name
const ZE_IMAGE_VIEW_PLANAR_EXP_NAME = "ZE_experimental_image_view_planar"
// ZeImageViewPlanarExpVersion (ze_image_view_planar_exp_version_t) Image View Planar Extension Version(s)
type ZeImageViewPlanarExpVersion uintptr
const (
ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 version 1.0
ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT latest known version
ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 ZeImageViewPlanarExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs
)
// ZeImageViewPlanarExpDesc (ze_image_view_planar_exp_desc_t) Image view planar descriptor
type ZeImageViewPlanarExpDesc 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).
Planeindex uint32 // Planeindex [DEPRECATED] no longer supported, use ::ze_image_view_planar_ext_desc_t instead
}

View File

@@ -0,0 +1,73 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME Immediate Command List Append Extension Name
const ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME = "ZE_experimental_immediate_command_list_append"
// ZeImmediateCommandListAppendExpVersion (ze_immediate_command_list_append_exp_version_t) Immediate Command List Append Extension Version(s)
type ZeImmediateCommandListAppendExpVersion uintptr
const (
ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 version 1.0
ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT latest known version
ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 ZeImmediateCommandListAppendExpVersion = 0x7fffffff // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs
)
// ZeCommandListImmediateAppendCommandListsExp Appends command lists to dispatch from an immediate command list.
///
/// @details
/// - The application must call this function only with command lists
/// created with ::zeCommandListCreateImmediate.
/// - The command lists passed to this function in the `phCommandLists`
/// argument must be regular command lists (i.e. not immediate command
/// lists).
/// - 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 == hCommandListImmediate`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phCommandLists`
func ZeCommandListImmediateAppendCommandListsExp(
hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list
numCommandLists uint32, // numCommandLists [in] number of command lists
phCommandLists *ZeCommandListHandle, // phCommandLists [in][range(0, numCommandLists)] handles of command lists
hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - if not null, this event is signaled after the completion of all appended command lists
numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing appended command lists; must be 0 if nullptr == phWaitEvents
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing appended command lists. - if not null, all wait events must be satisfied prior to the start of any appended command list(s)
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListImmediateAppendCommandListsExp", uintptr(hCommandListImmediate), uintptr(numCommandLists), uintptr(unsafe.Pointer(phCommandLists)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}

97
core/ipcMemHandleType.go Normal file
View File

@@ -0,0 +1,97 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME IPC Memory Handle Type Extension Name
const ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME = "ZE_extension_ipc_mem_handle_type"
// ZeIpcMemHandleTypeExtVersion (ze_ipc_mem_handle_type_ext_version_t) IPC Memory Handle Type Extension Version(s)
type ZeIpcMemHandleTypeExtVersion uintptr
const (
ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 version 1.0
ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT latest known version
ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 ZeIpcMemHandleTypeExtVersion = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_* ENUMs
)
// ZeIpcMemHandleTypeFlags (ze_ipc_mem_handle_type_flags_t) Supported IPC memory handle type flags
type ZeIpcMemHandleTypeFlags uint32
const (
ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT ZeIpcMemHandleTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT Local IPC memory handle type for use within the same machine.
ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE ZeIpcMemHandleTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE Fabric accessible IPC memory handle type for use across machines via a
///< supported fabric.
ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 ZeIpcMemHandleTypeFlags = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_FLAG_* ENUMs
)
// ZeIpcMemHandleTypeExtDesc (ze_ipc_mem_handle_type_ext_desc_t) ['IPC Memory Handle Type Extension Descriptor', 'Used in
/// ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and
/// ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory
/// handle type to create for this allocation.']
type ZeIpcMemHandleTypeExtDesc 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).
Typeflags ZeIpcMemHandleTypeFlags // Typeflags [in] valid combination of ::ze_ipc_mem_handle_type_flag_t
}
// ZeMemGetIpcHandleWithProperties Creates an IPC memory handle for the specified allocation with
/// properties for the requested handle.
///
/// @details
/// - Takes a pointer to a device or host memory allocation and creates an
/// IPC memory handle for exporting it for use in another process.
/// - The pointer must be the base pointer of a device or host memory
/// allocation; i.e. the value returned from ::zeMemAllocDevice or from
/// ::zeMemAllocHost, respectively or allocated from
/// ::zePhysicalMemCreate.
/// - 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 == ptr`
/// + `nullptr == pIpcHandle`
func ZeMemGetIpcHandleWithProperties(
hContext ZeContextHandle, // hContext [in] handle of the context object
ptr unsafe.Pointer, // ptr [in] pointer to the device memory allocation
pNext unsafe.Pointer, // pNext [in][optional] Pointer to extension-specific structure.
pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeMemGetIpcHandleWithProperties", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pNext)), uintptr(unsafe.Pointer(pIpcHandle)))
}

View File

@@ -0,0 +1,78 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME Get Kernel Allocation Properties Extension Name
const ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME = "ZE_experimental_kernel_allocation_properties"
// ZeKernelGetAllocationPropertiesExpVersion (ze_kernel_get_allocation_properties_exp_version_t) Get Kernel Allocation Properties Extension Version(s)
type ZeKernelGetAllocationPropertiesExpVersion uintptr
const (
ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 version 1.0
ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT latest known version
ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeKernelGetAllocationPropertiesExpVersion = 0x7fffffff // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_* ENUMs
)
// ZeKernelAllocationExpProperties (ze_kernel_allocation_exp_properties_t) Kernel allocation properties
type ZeKernelAllocationExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Base uint64 // Base [out] base address of the allocation
Size uintptr // Size [out] size of allocation
Type ZeMemoryType // Type [out] type of allocation
Argindex uint32 // Argindex [out] kernel argument index for current allocation, -1 for driver internal (not kernel argument) allocations
}
// ZeKernelGetAllocationPropertiesExp Retrieves kernel allocation properties.
///
/// @details
/// - A valid kernel handle must be created with ::zeKernelCreate.
/// - Returns array of kernel allocation properties for kernel handle.
/// - 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 == hKernel`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZeKernelGetAllocationPropertiesExp(
hKernel ZeKernelHandle, // hKernel [in] Kernel handle.
pCount *uint32, // pCount [in,out] pointer to the number of kernel allocation properties. if count is zero, then the driver shall update the value with the total number of kernel allocation properties available. if count is greater than the number of kernel allocation properties available, then the driver shall update the value with the correct number of kernel allocation properties.
pAllocationProperties *ZeKernelAllocationExpProperties, // pAllocationProperties [in,out][optional][range(0, *pCount)] array of kernel allocation properties. if count is less than the number of kernel allocation properties available, then driver shall only retrieve that number of kernel allocation properties.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeKernelGetAllocationPropertiesExp", uintptr(hKernel), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pAllocationProperties)))
}

View File

@@ -0,0 +1,47 @@
// 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 core
import (
"unsafe"
)
// ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME Kernel Max Group Size Properties Extension Name
const ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties"
// ZeKernelMaxGroupSizePropertiesExtVersion (ze_kernel_max_group_size_properties_ext_version_t) Kernel Max Group Size Properties Extension Version(s)
type ZeKernelMaxGroupSizePropertiesExtVersion uintptr
const (
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeKernelMaxGroupSizePropertiesExtVersion = 0x7fffffff // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs
)
// ZeKernelMaxGroupSizePropertiesExt (ze_kernel_max_group_size_properties_ext_t) Additional kernel max group size properties
///
/// @details
/// - This structure may be passed to ::zeKernelGetProperties, via the
/// `pNext` member of ::ze_kernel_properties_t, to query additional kernel
/// max group size properties.
type ZeKernelMaxGroupSizePropertiesExt struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Maxgroupsize uint32 // Maxgroupsize [out] maximum group size that can be used to execute the kernel. This value may be less than or equal to the `maxTotalGroupSize` member of ::ze_device_compute_properties_t.
}
// ZeKernelMaxGroupSizeExtProperties (ze_kernel_max_group_size_ext_properties_t) compiler-independent type
type ZeKernelMaxGroupSizeExtProperties ZeKernelMaxGroupSizePropertiesExt

View File

@@ -0,0 +1,108 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME Kernel Scheduling Hints Extension Name
const ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints"
// ZeSchedulingHintsExpVersion (ze_scheduling_hints_exp_version_t) Kernel Scheduling Hints Extension Version(s)
type ZeSchedulingHintsExpVersion uintptr
const (
ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 version 1.0
ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT latest known version
ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 ZeSchedulingHintsExpVersion = 0x7fffffff // ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs
)
// ZeSchedulingHintExpFlags (ze_scheduling_hint_exp_flags_t) Supported kernel scheduling hint flags
type ZeSchedulingHintExpFlags uint32
const (
ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST ZeSchedulingHintExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST Hint that the kernel prefers oldest-first scheduling
ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN Hint that the kernel prefers round-robin scheduling
ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN Hint that the kernel prefers stall-based round-robin scheduling
ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 ZeSchedulingHintExpFlags = 0x7fffffff // ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs
)
// ZeSchedulingHintExpProperties (ze_scheduling_hint_exp_properties_t) Device kernel scheduling hint properties queried using
/// ::zeDeviceGetModuleProperties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetModuleProperties, via
/// the `pNext` member of ::ze_device_module_properties_t.
type ZeSchedulingHintExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Schedulinghintflags ZeSchedulingHintExpFlags // Schedulinghintflags [out] Supported kernel scheduling hints. May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t.
}
// ZeSchedulingHintExpDesc (ze_scheduling_hint_exp_desc_t) Kernel scheduling hint descriptor
///
/// @details
/// - This structure may be passed to ::zeKernelSchedulingHintExp.
type ZeSchedulingHintExpDesc 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 ZeSchedulingHintExpFlags // Flags [in] flags specifying kernel scheduling hints. must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t.
}
// ZeKernelSchedulingHintExp Provide kernel scheduling hints that may improve performance
///
/// @details
/// - The scheduling hints may improve performance only and are not required
/// for correctness.
/// - If a specified scheduling hint is unsupported it will be silently
/// ignored.
/// - If two conflicting scheduling hints are specified there is no defined behavior;
/// the hints may be ignored or one hint may be chosen arbitrarily.
/// - The application must not call this function from simultaneous threads
/// with the same kernel 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 == hKernel`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pHint`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x7 < pHint->flags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeKernelSchedulingHintExp(
hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object
pHint *ZeSchedulingHintExpDesc, // pHint [in] pointer to kernel scheduling hint descriptor
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeKernelSchedulingHintExp", uintptr(hKernel), uintptr(unsafe.Pointer(pHint)))
}

94
core/linkageInspection.go Normal file
View File

@@ -0,0 +1,94 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_LINKAGE_INSPECTION_EXT_NAME Linkage Inspection Extension Name
const ZE_LINKAGE_INSPECTION_EXT_NAME = "ZE_extension_linkage_inspection"
// ZeLinkageInspectionExtVersion (ze_linkage_inspection_ext_version_t) Linkage Inspection Extension Version(s)
type ZeLinkageInspectionExtVersion uintptr
const (
ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 version 1.0
ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT latest known version
ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 ZeLinkageInspectionExtVersion = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs
)
// ZeLinkageInspectionExtFlags (ze_linkage_inspection_ext_flags_t) Supported module linkage inspection flags
type ZeLinkageInspectionExtFlags uint32
const (
ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS List all imports of modules
ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS List all imports of modules that do not have a corresponding export
ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS List all exports of modules
ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 ZeLinkageInspectionExtFlags = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs
)
// ZeLinkageInspectionExtDesc (ze_linkage_inspection_ext_desc_t) Module linkage inspection descriptor
///
/// @details
/// - This structure may be passed to ::zeModuleInspectLinkageExt.
type ZeLinkageInspectionExtDesc 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 ZeLinkageInspectionExtFlags // Flags [in] flags specifying module linkage inspection. must be 0 (default) or a valid combination of ::ze_linkage_inspection_ext_flag_t.
}
// ZeModuleInspectLinkageExt List Imports & Exports
///
/// @details
/// - List all the import & unresolveable import dependencies & exports of a
/// set of modules
///
/// @remarks
/// _Analogues_
/// - None
///
/// @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_POINTER
/// + `nullptr == pInspectDesc`
/// + `nullptr == phModules`
/// + `nullptr == phLog`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x7 < pInspectDesc->flags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeModuleInspectLinkageExt(
pInspectDesc *ZeLinkageInspectionExtDesc, // pInspectDesc [in] pointer to linkage inspection descriptor structure.
numModules uint32, // numModules [in] number of modules to be inspected pointed to by phModules.
phModules *ZeModuleHandle, // phModules [in][range(0, numModules)] pointer to an array of modules to be inspected for import dependencies.
phLog *ZeModuleBuildLogHandle, // phLog [out] pointer to handle of linkage inspection log. Log object will contain separate lists of imports, un-resolvable imports, and exports.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeModuleInspectLinkageExt", uintptr(unsafe.Pointer(pInspectDesc)), uintptr(numModules), uintptr(unsafe.Pointer(phModules)), uintptr(unsafe.Pointer(phLog)))
}

27
core/linkonceodr.go Normal file
View File

@@ -0,0 +1,27 @@
// 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 core
// ZE_LINKONCE_ODR_EXT_NAME Linkonce ODR Extension Name
const ZE_LINKONCE_ODR_EXT_NAME = "ZE_extension_linkonce_odr"
// ZeLinkonceOdrExtVersion (ze_linkonce_odr_ext_version_t) Linkonce ODR Extension Version(s)
type ZeLinkonceOdrExtVersion uintptr
const (
ZE_LINKONCE_ODR_EXT_VERSION_1_0 ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKONCE_ODR_EXT_VERSION_1_0 version 1.0
ZE_LINKONCE_ODR_EXT_VERSION_CURRENT ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKONCE_ODR_EXT_VERSION_CURRENT latest known version
ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 ZeLinkonceOdrExtVersion = 0x7fffffff // ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs
)

View File

@@ -0,0 +1,57 @@
// 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 core
import (
"unsafe"
)
// ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME Memory Compression Hints Extension Name
const ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME = "ZE_extension_memory_compression_hints"
// ZeMemoryCompressionHintsExtVersion (ze_memory_compression_hints_ext_version_t) Memory Compression Hints Extension Version(s)
type ZeMemoryCompressionHintsExtVersion uintptr
const (
ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 version 1.0
ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT latest known version
ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 ZeMemoryCompressionHintsExtVersion = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs
)
// ZeMemoryCompressionHintsExtFlags (ze_memory_compression_hints_ext_flags_t) Supported memory compression hints flags
type ZeMemoryCompressionHintsExtFlags uint32
const (
ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED Hint Driver implementation to make allocation compressible
ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED Hint Driver implementation to make allocation not compressible
ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 ZeMemoryCompressionHintsExtFlags = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs
)
// ZeMemoryCompressionHintsExtDesc (ze_memory_compression_hints_ext_desc_t) Compression hints memory allocation descriptor
///
/// @details
/// - This structure may be passed to ::zeMemAllocShared or
/// ::zeMemAllocDevice, via the `pNext` member of
/// ::ze_device_mem_alloc_desc_t.
/// - This structure may be passed to ::zeMemAllocHost, via the `pNext`
/// member of ::ze_host_mem_alloc_desc_t.
/// - This structure may be passed to ::zeImageCreate, via the `pNext`
/// member of ::ze_image_desc_t.
type ZeMemoryCompressionHintsExtDesc 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 ZeMemoryCompressionHintsExtFlags // Flags [in] flags specifying if allocation should be compressible or not. Must be set to one of the ::ze_memory_compression_hints_ext_flag_t;
}

116
core/memoryFreePolicies.go Normal file
View File

@@ -0,0 +1,116 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_MEMORY_FREE_POLICIES_EXT_NAME Memory Free Policies Extension Name
const ZE_MEMORY_FREE_POLICIES_EXT_NAME = "ZE_extension_memory_free_policies"
// ZeMemoryFreePoliciesExtVersion (ze_memory_free_policies_ext_version_t) Memory Free Policies Extension Version(s)
type ZeMemoryFreePoliciesExtVersion uintptr
const (
ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 version 1.0
ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT latest known version
ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 ZeMemoryFreePoliciesExtVersion = 0x7fffffff // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs
)
// ZeDriverMemoryFreePolicyExtFlags (ze_driver_memory_free_policy_ext_flags_t) Supported memory free policy capability flags
type ZeDriverMemoryFreePolicyExtFlags uint32
const (
ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE Blocks until all commands using the memory are complete before
///< scheduling memory to be freed. Does not guarantee memory is freed upon
///< return, only that it is safe and is scheduled to be freed. Actual
///< freeing of memory is specific to user mode driver and kernel mode
///< driver implementation and may be done asynchronously.
ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE Immediately schedules the memory to be freed and returns without
///< blocking. Memory may be freed after all commands using the memory are
///< complete. Actual freeing of memory is specific to user mode driver and
///< kernel mode driver implementation and may be done asynchronously.
ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 ZeDriverMemoryFreePolicyExtFlags = 0x7fffffff // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs
)
// ZeDriverMemoryFreeExtProperties (ze_driver_memory_free_ext_properties_t) Driver memory free properties queried using ::zeDriverGetProperties
///
/// @details
/// - All drivers must support an immediate free policy, which is the
/// default free policy.
/// - This structure may be returned from ::zeDriverGetProperties, via the
/// `pNext` member of ::ze_driver_properties_t.
type ZeDriverMemoryFreeExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Freepolicies ZeDriverMemoryFreePolicyExtFlags // Freepolicies [out] Supported memory free policies. must be 0 or a combination of ::ze_driver_memory_free_policy_ext_flag_t.
}
// ZeMemoryFreeExtDesc (ze_memory_free_ext_desc_t) Memory free descriptor with free policy
type ZeMemoryFreeExtDesc 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).
Freepolicy ZeDriverMemoryFreePolicyExtFlags // Freepolicy [in] flags specifying the memory free policy. must be 0 (default) or a supported ::ze_driver_memory_free_policy_ext_flag_t; default behavior is to free immediately.
}
// ZeMemFreeExt Frees allocated host memory, device memory, or shared memory on the
/// context using the specified free policy.
///
/// @details
/// - Similar to zeMemFree, with added parameter to choose the free policy.
/// - Does not gaurantee memory is freed upon return. See free policy
/// descriptions for details.
/// - The application must **not** call this function from simultaneous
/// threads with the same pointer.
/// - 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 == pMemFreeDesc`
/// + `nullptr == ptr`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x3 < pMemFreeDesc->freePolicy`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeMemFreeExt(
hContext ZeContextHandle, // hContext [in] handle of the context object
pMemFreeDesc *ZeMemoryFreeExtDesc, // pMemFreeDesc [in] pointer to memory free descriptor
ptr unsafe.Pointer, // ptr [in][release] pointer to memory to free
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeMemFreeExt", uintptr(hContext), uintptr(unsafe.Pointer(pMemFreeDesc)), uintptr(unsafe.Pointer(ptr)))
}

80
core/memoryProperties.go Normal file
View File

@@ -0,0 +1,80 @@
// 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 core
import (
"unsafe"
)
// ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME Device Memory Properties Extension Name
const ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME = "ZE_extension_device_memory_properties"
// ZeDeviceMemoryPropertiesExtVersion (ze_device_memory_properties_ext_version_t) Device Memory Properties Extension Version(s)
type ZeDeviceMemoryPropertiesExtVersion uintptr
const (
ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 version 1.0
ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT latest known version
ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceMemoryPropertiesExtVersion = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs
)
// ZeDeviceMemoryExtType (ze_device_memory_ext_type_t) Memory module types
type ZeDeviceMemoryExtType uintptr
const (
ZE_DEVICE_MEMORY_EXT_TYPE_HBM ZeDeviceMemoryExtType = 0 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM HBM memory
ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 ZeDeviceMemoryExtType = 1 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 HBM2 memory
ZE_DEVICE_MEMORY_EXT_TYPE_DDR ZeDeviceMemoryExtType = 2 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR DDR memory
ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 ZeDeviceMemoryExtType = 3 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 DDR2 memory
ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 ZeDeviceMemoryExtType = 4 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 DDR3 memory
ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 ZeDeviceMemoryExtType = 5 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 DDR4 memory
ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 ZeDeviceMemoryExtType = 6 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 DDR5 memory
ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR ZeDeviceMemoryExtType = 7 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR LPDDR memory
ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 ZeDeviceMemoryExtType = 8 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 LPDDR3 memory
ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 ZeDeviceMemoryExtType = 9 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 LPDDR4 memory
ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 ZeDeviceMemoryExtType = 10 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 LPDDR5 memory
ZE_DEVICE_MEMORY_EXT_TYPE_SRAM ZeDeviceMemoryExtType = 11 // ZE_DEVICE_MEMORY_EXT_TYPE_SRAM SRAM memory
ZE_DEVICE_MEMORY_EXT_TYPE_L1 ZeDeviceMemoryExtType = 12 // ZE_DEVICE_MEMORY_EXT_TYPE_L1 L1 cache
ZE_DEVICE_MEMORY_EXT_TYPE_L3 ZeDeviceMemoryExtType = 13 // ZE_DEVICE_MEMORY_EXT_TYPE_L3 L3 cache
ZE_DEVICE_MEMORY_EXT_TYPE_GRF ZeDeviceMemoryExtType = 14 // ZE_DEVICE_MEMORY_EXT_TYPE_GRF Execution unit register file
ZE_DEVICE_MEMORY_EXT_TYPE_SLM ZeDeviceMemoryExtType = 15 // ZE_DEVICE_MEMORY_EXT_TYPE_SLM Execution unit shared local memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 ZeDeviceMemoryExtType = 16 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 GDDR4 memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 ZeDeviceMemoryExtType = 17 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 GDDR5 memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X ZeDeviceMemoryExtType = 18 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X GDDR5X memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 ZeDeviceMemoryExtType = 19 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 GDDR6 memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X ZeDeviceMemoryExtType = 20 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X GDDR6X memory
ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 ZeDeviceMemoryExtType = 21 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 GDDR7 memory
ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E ZeDeviceMemoryExtType = 22 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E HBM2E memory
ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 ZeDeviceMemoryExtType = 23 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 HBM3 memory
ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E ZeDeviceMemoryExtType = 24 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E HBM3E memory
ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 ZeDeviceMemoryExtType = 25 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 HBM4 memory
ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 ZeDeviceMemoryExtType = 0x7fffffff // ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs
)
// ZeDeviceMemoryExtProperties (ze_device_memory_ext_properties_t) Memory properties
///
/// @details
/// - This structure may be returned from ::zeDeviceGetMemoryProperties via
/// the `pNext` member of ::ze_device_memory_properties_t
type ZeDeviceMemoryExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Type ZeDeviceMemoryExtType // Type [out] The memory type
Physicalsize uint64 // Physicalsize [out] Physical memory size in bytes. A value of 0 indicates that this property is not known. However, a call to ::zesMemoryGetState() will correctly return the total size of usable memory.
Readbandwidth uint32 // Readbandwidth [out] Design bandwidth for reads
Writebandwidth uint32 // Writebandwidth [out] Design bandwidth for writes
Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit
}

395
core/mutableCommandList.go Normal file
View File

@@ -0,0 +1,395 @@
// 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 core
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_MUTABLE_COMMAND_LIST_EXP_NAME Mutable Command List Extension Name
const ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list"
// ZeMutableCommandListExpVersion (ze_mutable_command_list_exp_version_t) Mutable Command List Extension Version(s)
type ZeMutableCommandListExpVersion uintptr
const (
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 version 1.0
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 version 1.1
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT latest known version
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 ZeMutableCommandListExpVersion = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs
)
// ZeMutableCommandExpFlags (ze_mutable_command_exp_flags_t) Mutable command flags
type ZeMutableCommandExpFlags uint32
const (
ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS kernel arguments
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT ZeMutableCommandExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT kernel group count
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE ZeMutableCommandExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE kernel group size
ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET ZeMutableCommandExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET kernel global offset
ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT ZeMutableCommandExpFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT command signal event
ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS ZeMutableCommandExpFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS command wait events
ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION ZeMutableCommandExpFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION command kernel
ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS graph arguments
ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 ZeMutableCommandExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs
)
// ZeMutableCommandIdExpDesc (ze_mutable_command_id_exp_desc_t) Mutable command identifier descriptor
type ZeMutableCommandIdExpDesc 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 ZeMutableCommandExpFlags // Flags [in] mutable command flags. - must be 0 (default, equivalent to setting all flags bar kernel instruction), or a valid combination of ::ze_mutable_command_exp_flag_t - in order to include kernel instruction mutation, ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included
}
// ZeMutableCommandListExpFlags (ze_mutable_command_list_exp_flags_t) Mutable command list flags
type ZeMutableCommandListExpFlags uint32
const (
ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED ZeMutableCommandListExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED reserved
ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 ZeMutableCommandListExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs
)
// ZeMutableCommandListExpProperties (ze_mutable_command_list_exp_properties_t) Mutable command list properties
type ZeMutableCommandListExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Mutablecommandlistflags ZeMutableCommandListExpFlags // Mutablecommandlistflags [out] mutable command list flags
Mutablecommandflags ZeMutableCommandExpFlags // Mutablecommandflags [out] mutable command flags
}
// ZeMutableCommandListExpDesc (ze_mutable_command_list_exp_desc_t) Mutable command list descriptor
type ZeMutableCommandListExpDesc 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 ZeMutableCommandListExpFlags // Flags [in] mutable command list flags. - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t
}
// ZeMutableCommandsExpDesc (ze_mutable_commands_exp_desc_t) Mutable commands descriptor
type ZeMutableCommandsExpDesc 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 uint32 // Flags [in] must be 0, this field is reserved for future use
}
// ZeMutableKernelArgumentExpDesc (ze_mutable_kernel_argument_exp_desc_t) Mutable kernel argument descriptor
type ZeMutableKernelArgumentExpDesc 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).
Commandid uint64 // Commandid [in] command identifier
Argindex uint32 // Argindex [in] kernel argument index
Argsize uintptr // Argsize [in] kernel argument size
Pargvalue unsafe.Pointer // Pargvalue [in] pointer to kernel argument value
}
// ZeMutableGroupCountExpDesc (ze_mutable_group_count_exp_desc_t) Mutable kernel group count descriptor
type ZeMutableGroupCountExpDesc 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).
Commandid uint64 // Commandid [in] command identifier
Pgroupcount *ZeGroupCount // Pgroupcount [in] pointer to group count
}
// ZeMutableGroupSizeExpDesc (ze_mutable_group_size_exp_desc_t) Mutable kernel group size descriptor
type ZeMutableGroupSizeExpDesc 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).
Commandid uint64 // Commandid [in] command identifier
Groupsizex uint32 // Groupsizex [in] group size for X dimension to use for the kernel
Groupsizey uint32 // Groupsizey [in] group size for Y dimension to use for the kernel
Groupsizez uint32 // Groupsizez [in] group size for Z dimension to use for the kernel
}
// ZeMutableGlobalOffsetExpDesc (ze_mutable_global_offset_exp_desc_t) Mutable kernel global offset descriptor
type ZeMutableGlobalOffsetExpDesc 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).
Commandid uint64 // Commandid [in] command identifier
Offsetx uint32 // Offsetx [in] global offset for X dimension to use for this kernel
Offsety uint32 // Offsety [in] global offset for Y dimension to use for this kernel
Offsetz uint32 // Offsetz [in] global offset for Z dimension to use for this kernel
}
// ZeMutableGraphArgumentExpDesc (ze_mutable_graph_argument_exp_desc_t) Mutable graph argument descriptor
type ZeMutableGraphArgumentExpDesc 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).
Commandid uint64 // Commandid [in] command identifier
Argindex uint32 // Argindex [in] graph argument index
Pargvalue unsafe.Pointer // Pargvalue [in] pointer to graph argument value
}
// ZeCommandListGetNextCommandIdExp Returns a unique command identifier for the next command to be
/// appended to a command list.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - This function may not be called on a closed command list.
/// - This function may be called 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 == desc`
/// + `nullptr == pCommandId`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0xff < desc->flags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeCommandListGetNextCommandIdExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
desc *ZeMutableCommandIdExpDesc, // desc [in] pointer to mutable command identifier descriptor
pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(pCommandId)))
}
// ZeCommandListGetNextCommandIdWithKernelsExp Returns a unique command identifier for the next command to be
/// appended to a command list. Provides possible kernel handles for
/// kernel mutation when ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION
/// flag is present.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - This function may not be called on a closed command list.
/// - This function may be called 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 == desc`
/// + `nullptr == pCommandId`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0xff < desc->flags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZeCommandListGetNextCommandIdWithKernelsExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
desc *ZeMutableCommandIdExpDesc, // desc [in][out] pointer to mutable command identifier descriptor
numKernels uint32, // numKernels [in][optional] number of entries on phKernels list
phKernels *ZeKernelHandle, // phKernels [in][optional][range(0, numKernels)] list of kernels that user can switch between using ::zeCommandListUpdateMutableCommandKernelsExp call
pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdWithKernelsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(numKernels), uintptr(unsafe.Pointer(phKernels)), uintptr(unsafe.Pointer(pCommandId)))
}
// ZeCommandListUpdateMutableCommandsExp Updates mutable commands.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - The application must synchronize mutable command list execution before
/// calling this function.
/// - The application must close a mutable command list after completing all
/// updates.
/// - This function must not be called 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_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 == desc`
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// + Invalid kernel argument or not matching update descriptor provided
func ZeCommandListUpdateMutableCommandsExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
desc *ZeMutableCommandsExpDesc, // desc [in] pointer to mutable commands descriptor; multiple descriptors may be chained via `pNext` member
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)))
}
// ZeCommandListUpdateMutableCommandSignalEventExp Updates the signal event for a mutable command in a mutable command
/// list.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - The type, scope and flags of the signal event must match those of the
/// source command.
/// - The application must synchronize mutable command list execution before
/// calling this function.
/// - The application must close a mutable command list after completing all
/// updates.
/// - This function must not be called 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 ZeCommandListUpdateMutableCommandSignalEventExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
commandId uint64, // commandId [in] command identifier
hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandSignalEventExp", uintptr(hCommandList), uintptr(commandId), uintptr(hSignalEvent))
}
// ZeCommandListUpdateMutableCommandWaitEventsExp Updates the wait events for a mutable command in a mutable command
/// list.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - The number of wait events must match that of the source command.
/// - The type, scope and flags of the wait events must match those of the
/// source command.
/// - Passing `nullptr` as the wait events will update the command to not
/// wait on any events prior to dispatch.
/// - Passing `nullptr` as an event on event wait list will remove event
/// dependency from this wait list slot.
/// - The application must synchronize mutable command list execution before
/// calling this function.
/// - The application must close a mutable command list after completing all
/// updates.
/// - This function must not be called 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_SIZE
/// + The `numWaitEvents` parameter does not match that of the original command.
func ZeCommandListUpdateMutableCommandWaitEventsExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
commandId uint64, // commandId [in] command identifier
numWaitEvents uint32, // numWaitEvents [in][optional] the number of wait events
phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandWaitEventsExp", uintptr(hCommandList), uintptr(commandId), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}
// ZeCommandListUpdateMutableCommandKernelsExp Updates the kernel for a mutable command in a mutable command list.
///
/// @details
/// - This function may only be called for a mutable command list.
/// - The kernel handle must be from the provided list for given command id.
/// - The application must synchronize mutable command list execution before
/// calling this function.
/// - The application must close a mutable command list after completing all
/// updates.
/// - This function must not be called from simultaneous threads with the
/// same command list handle.
/// - This function must be called before updating kernel arguments and
/// dispatch parameters, when kernel is mutated.
/// - 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 == pCommandId`
/// + `nullptr == phKernels`
/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE
/// + Invalid kernel handle provided for the mutation kernel instruction operation.
func ZeCommandListUpdateMutableCommandKernelsExp(
hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list
numKernels uint32, // numKernels [in] the number of kernels to update
pCommandId *uint64, // pCommandId [in][range(0, numKernels)] command identifier
phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handle of the kernel for a command identifier to switch to
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandKernelsExp", uintptr(hCommandList), uintptr(numKernels), uintptr(unsafe.Pointer(pCommandId)), uintptr(unsafe.Pointer(phKernels)))
}

54
core/powersavinghint.go Normal file
View File

@@ -0,0 +1,54 @@
// 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 core
import (
"unsafe"
)
// ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME Power Saving Hint Extension Name
const ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME = "ZE_experimental_power_saving_hint"
// ZePowerSavingHintExpVersion (ze_power_saving_hint_exp_version_t) Power Saving Hint Extension Version(s)
type ZePowerSavingHintExpVersion uintptr
const (
ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 version 1.0
ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT latest known version
ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 ZePowerSavingHintExpVersion = 0x7fffffff // ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs
)
// ZePowerSavingHintType (ze_power_saving_hint_type_t) Supported device types
type ZePowerSavingHintType uintptr
const (
ZE_POWER_SAVING_HINT_TYPE_MIN ZePowerSavingHintType = 0 // ZE_POWER_SAVING_HINT_TYPE_MIN Minumum power savings. The device will make no attempt to save power
///< while executing work submitted to this context.
ZE_POWER_SAVING_HINT_TYPE_MAX ZePowerSavingHintType = 100 // ZE_POWER_SAVING_HINT_TYPE_MAX Maximum power savings. The device will do everything to bring power to
///< a minimum while executing work submitted to this context.
ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 ZePowerSavingHintType = 0x7fffffff // ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs
)
// ZeContextPowerSavingHintExpDesc (ze_context_power_saving_hint_exp_desc_t) Extended context descriptor containing power saving hint.
type ZeContextPowerSavingHintExpDesc 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).
Hint uint32 // Hint [in] power saving hint (default value = 0). This is value from [0,100] and can use pre-defined settings from ::ze_power_saving_hint_type_t.
}

View File

@@ -0,0 +1,51 @@
// 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 core
import (
"unsafe"
)
// ZE_SUB_ALLOCATIONS_EXP_NAME Sub-Allocations Properties Extension Name
const ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations"
// ZeSubAllocationsExpVersion (ze_sub_allocations_exp_version_t) Sub-Allocations Properties Extension Version(s)
type ZeSubAllocationsExpVersion uintptr
const (
ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 version 1.0
ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT latest known version
ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 ZeSubAllocationsExpVersion = 0x7fffffff // ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs
)
// ZeSubAllocation (ze_sub_allocation_t) Properties returned for a sub-allocation
type ZeSubAllocation struct {
Base unsafe.Pointer // Base [in,out][optional] base address of the sub-allocation
Size uintptr // Size [in,out][optional] size of the allocation
}
// ZeMemorySubAllocationsExpProperties (ze_memory_sub_allocations_exp_properties_t) Sub-Allocations Properties
///
/// @details
/// - This structure may be passed to ::zeMemGetAllocProperties, via the
/// `pNext` member of ::ze_memory_allocation_properties_t.
type ZeMemorySubAllocationsExpProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Pcount *uint32 // Pcount [in,out] pointer to the number of sub-allocations. if count is zero, then the driver shall update the value with the total number of sub-allocations on which the allocation has been divided. if count is greater than the number of sub-allocations, then the driver shall update the value with the correct number of sub-allocations.
Psuballocations *ZeSubAllocation // Psuballocations [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. if count is less than the number of sub-allocations available, then driver shall only retrieve properties for that number of sub-allocations.
}

27
core/subgroups.go Normal file
View File

@@ -0,0 +1,27 @@
// 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 core
// ZE_SUBGROUPS_EXT_NAME Subgroups Extension Name
const ZE_SUBGROUPS_EXT_NAME = "ZE_extension_subgroups"
// ZeSubgroupExtVersion (ze_subgroup_ext_version_t) Subgroups Extension Version(s)
type ZeSubgroupExtVersion uintptr
const (
ZE_SUBGROUP_EXT_VERSION_1_0 ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUBGROUP_EXT_VERSION_1_0 version 1.0
ZE_SUBGROUP_EXT_VERSION_CURRENT ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUBGROUP_EXT_VERSION_CURRENT latest known version
ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 ZeSubgroupExtVersion = 0x7fffffff // ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs
)

View File

@@ -1,3 +0,0 @@
// Code generated by gen. DO NOT EDIT.
package rntm