From d42d758aeb313edec4a9e67dd1dd4818ce2dc17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:38:41 +0800 Subject: [PATCH] feat(gen): finish parsing ze_api.h --- cmd/gen/scan.go | 122 +- cmd/gen/symbol.go | 1 + core/EUCount.go | 44 + core/PCIProperties.go | 100 ++ core/RTAS.go | 479 ++++++ core/RTASBuilder.go | 882 ++++++++++ core/SRGB.go | 44 + core/bandwidth.go | 63 + core/bfloat16conversions.go | 27 + core/bindlessimages.go | 180 ++ core/cacheReservation.go | 139 ++ core/callbacks.go | 2305 ++++++++++++++++++++++++++ core/commandListClone.go | 75 + core/counterbasedeventpool.go | 50 + core/deviceLUID.go | 53 + core/deviceVectorSizes.go | 96 ++ core/deviceipversion.go | 43 + core/deviceusablememproperties.go | 43 + core/eventQueryKernelTimestamps.go | 129 ++ core/eventquerytimestamps.go | 79 + core/externalMemMap.go | 47 + core/fabric.go | 372 +++++ core/imageCopy.go | 169 ++ core/imageFormatSupport.go | 48 + core/imageQueryAllocProperties.go | 74 + core/imagememoryproperties.go | 80 + core/imageview.go | 157 ++ core/imageviewplanar.go | 59 + core/immediateCommandListAppend.go | 73 + core/ipcMemHandleType.go | 97 ++ core/kernelAllocationProperties.go | 78 + core/kernelMaxGroupSizeProperties.go | 47 + core/kernelSchedulingHints.go | 108 ++ core/linkageInspection.go | 94 ++ core/linkonceodr.go | 27 + core/memoryCompressionHints.go | 57 + core/memoryFreePolicies.go | 116 ++ core/memoryProperties.go | 80 + core/mutableCommandList.go | 395 +++++ core/powersavinghint.go | 54 + core/subAllocationsProperties.go | 51 + core/subgroups.go | 27 + rntm/common.go | 3 - 43 files changed, 7235 insertions(+), 32 deletions(-) create mode 100644 core/EUCount.go create mode 100644 core/PCIProperties.go create mode 100644 core/RTASBuilder.go create mode 100644 core/SRGB.go create mode 100644 core/bandwidth.go create mode 100644 core/bfloat16conversions.go create mode 100644 core/bindlessimages.go create mode 100644 core/cacheReservation.go create mode 100644 core/callbacks.go create mode 100644 core/commandListClone.go create mode 100644 core/counterbasedeventpool.go create mode 100644 core/deviceLUID.go create mode 100644 core/deviceVectorSizes.go create mode 100644 core/deviceipversion.go create mode 100644 core/deviceusablememproperties.go create mode 100644 core/eventQueryKernelTimestamps.go create mode 100644 core/eventquerytimestamps.go create mode 100644 core/externalMemMap.go create mode 100644 core/fabric.go create mode 100644 core/imageCopy.go create mode 100644 core/imageFormatSupport.go create mode 100644 core/imageQueryAllocProperties.go create mode 100644 core/imagememoryproperties.go create mode 100644 core/imageview.go create mode 100644 core/imageviewplanar.go create mode 100644 core/immediateCommandListAppend.go create mode 100644 core/ipcMemHandleType.go create mode 100644 core/kernelAllocationProperties.go create mode 100644 core/kernelMaxGroupSizeProperties.go create mode 100644 core/kernelSchedulingHints.go create mode 100644 core/linkageInspection.go create mode 100644 core/linkonceodr.go create mode 100644 core/memoryCompressionHints.go create mode 100644 core/memoryFreePolicies.go create mode 100644 core/memoryProperties.go create mode 100644 core/mutableCommandList.go create mode 100644 core/powersavinghint.go create mode 100644 core/subAllocationsProperties.go create mode 100644 core/subgroups.go delete mode 100644 rntm/common.go diff --git a/cmd/gen/scan.go b/cmd/gen/scan.go index a2a48a3..ce90c96 100644 --- a/cmd/gen/scan.go +++ b/cmd/gen/scan.go @@ -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) }) diff --git a/cmd/gen/symbol.go b/cmd/gen/symbol.go index d4e0aec..66fb536 100644 --- a/cmd/gen/symbol.go +++ b/cmd/gen/symbol.go @@ -46,6 +46,7 @@ const ( symbolSubTypeEmptyStruct symbolSubTypeLargeStruct symbolSubTypeEnum + symbolSubTypeFuncPtr ) type symbol struct { diff --git a/core/EUCount.go b/core/EUCount.go new file mode 100644 index 0000000..b27011e --- /dev/null +++ b/core/EUCount.go @@ -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 + +} + diff --git a/core/PCIProperties.go b/core/PCIProperties.go new file mode 100644 index 0000000..567f9c5 --- /dev/null +++ b/core/PCIProperties.go @@ -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))) +} + diff --git a/core/RTAS.go b/core/RTAS.go index 3973179..0257c22 100644 --- a/core/RTAS.go +++ b/core/RTAS.go @@ -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)) +} + diff --git a/core/RTASBuilder.go b/core/RTASBuilder.go new file mode 100644 index 0000000..2e3a4e4 --- /dev/null +++ b/core/RTASBuilder.go @@ -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)) +} + diff --git a/core/SRGB.go b/core/SRGB.go new file mode 100644 index 0000000..215ee37 --- /dev/null +++ b/core/SRGB.go @@ -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. + +} + diff --git a/core/bandwidth.go b/core/bandwidth.go new file mode 100644 index 0000000..9ed6a72 --- /dev/null +++ b/core/bandwidth.go @@ -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 + +} + diff --git a/core/bfloat16conversions.go b/core/bfloat16conversions.go new file mode 100644 index 0000000..1459c45 --- /dev/null +++ b/core/bfloat16conversions.go @@ -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 + +) + diff --git a/core/bindlessimages.go b/core/bindlessimages.go new file mode 100644 index 0000000..4d36083 --- /dev/null +++ b/core/bindlessimages.go @@ -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. + +} + diff --git a/core/cacheReservation.go b/core/cacheReservation.go new file mode 100644 index 0000000..a235115 --- /dev/null +++ b/core/cacheReservation.go @@ -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)) +} + diff --git a/core/callbacks.go b/core/callbacks.go new file mode 100644 index 0000000..af08405 --- /dev/null +++ b/core/callbacks.go @@ -0,0 +1,2305 @@ +// 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" +) + +// ZeInitParams (ze_init_params_t) Callback function parameters for zeInit +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeInitParams struct { + Pflags *ZeInitFlags +} + +// ZePfninitcb (ze_pfnInitCb_t) Callback function-pointer for zeInit +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfninitcb uintptr + +// ZeGlobalCallbacks (ze_global_callbacks_t) Table of Global callback functions pointers +type ZeGlobalCallbacks struct { + Pfninitcb ZePfninitcb +} + +// ZeDriverGetParams (ze_driver_get_params_t) Callback function parameters for zeDriverGet +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDriverGetParams struct { + Ppcount **uint32 + Pphdrivers **ZeDriverHandle +} + +// ZePfndrivergetcb (ze_pfnDriverGetCb_t) Callback function-pointer for zeDriverGet +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndrivergetcb uintptr + +// ZeDriverGetApiVersionParams (ze_driver_get_api_version_params_t) Callback function parameters for zeDriverGetApiVersion +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDriverGetApiVersionParams struct { + Phdriver *ZeDriverHandle + Pversion **ZeApiVersion +} + +// ZePfndrivergetapiversioncb (ze_pfnDriverGetApiVersionCb_t) Callback function-pointer for zeDriverGetApiVersion +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndrivergetapiversioncb uintptr + +// ZeDriverGetPropertiesParams (ze_driver_get_properties_params_t) Callback function parameters for zeDriverGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDriverGetPropertiesParams struct { + Phdriver *ZeDriverHandle + Ppdriverproperties **ZeDriverProperties +} + +// ZePfndrivergetpropertiescb (ze_pfnDriverGetPropertiesCb_t) Callback function-pointer for zeDriverGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndrivergetpropertiescb uintptr + +// ZeDriverGetIpcPropertiesParams (ze_driver_get_ipc_properties_params_t) Callback function parameters for zeDriverGetIpcProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDriverGetIpcPropertiesParams struct { + Phdriver *ZeDriverHandle + Ppipcproperties **ZeDriverIpcProperties +} + +// ZePfndrivergetipcpropertiescb (ze_pfnDriverGetIpcPropertiesCb_t) Callback function-pointer for zeDriverGetIpcProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndrivergetipcpropertiescb uintptr + +// ZeDriverGetExtensionPropertiesParams (ze_driver_get_extension_properties_params_t) Callback function parameters for zeDriverGetExtensionProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDriverGetExtensionPropertiesParams struct { + Phdriver *ZeDriverHandle + Ppcount **uint32 + Ppextensionproperties **ZeDriverExtensionProperties +} + +// ZePfndrivergetextensionpropertiescb (ze_pfnDriverGetExtensionPropertiesCb_t) Callback function-pointer for zeDriverGetExtensionProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndrivergetextensionpropertiescb uintptr + +// ZeDriverCallbacks (ze_driver_callbacks_t) Table of Driver callback functions pointers +type ZeDriverCallbacks struct { + Pfngetcb ZePfndrivergetcb + Pfngetapiversioncb ZePfndrivergetapiversioncb + Pfngetpropertiescb ZePfndrivergetpropertiescb + Pfngetipcpropertiescb ZePfndrivergetipcpropertiescb + Pfngetextensionpropertiescb ZePfndrivergetextensionpropertiescb +} + +// ZeDeviceGetParams (ze_device_get_params_t) Callback function parameters for zeDeviceGet +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetParams struct { + Phdriver *ZeDriverHandle + Ppcount **uint32 + Pphdevices **ZeDeviceHandle +} + +// ZePfndevicegetcb (ze_pfnDeviceGetCb_t) Callback function-pointer for zeDeviceGet +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetcb uintptr + +// ZeDeviceGetSubDevicesParams (ze_device_get_sub_devices_params_t) Callback function parameters for zeDeviceGetSubDevices +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetSubDevicesParams struct { + Phdevice *ZeDeviceHandle + Ppcount **uint32 + Pphsubdevices **ZeDeviceHandle +} + +// ZePfndevicegetsubdevicescb (ze_pfnDeviceGetSubDevicesCb_t) Callback function-pointer for zeDeviceGetSubDevices +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetsubdevicescb uintptr + +// ZeDeviceGetPropertiesParams (ze_device_get_properties_params_t) Callback function parameters for zeDeviceGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetPropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppdeviceproperties **ZeDeviceProperties +} + +// ZePfndevicegetpropertiescb (ze_pfnDeviceGetPropertiesCb_t) Callback function-pointer for zeDeviceGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetpropertiescb uintptr + +// ZeDeviceGetComputePropertiesParams (ze_device_get_compute_properties_params_t) Callback function parameters for zeDeviceGetComputeProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetComputePropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppcomputeproperties **ZeDeviceComputeProperties +} + +// ZePfndevicegetcomputepropertiescb (ze_pfnDeviceGetComputePropertiesCb_t) Callback function-pointer for zeDeviceGetComputeProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetcomputepropertiescb uintptr + +// ZeDeviceGetModulePropertiesParams (ze_device_get_module_properties_params_t) Callback function parameters for zeDeviceGetModuleProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetModulePropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppmoduleproperties **ZeDeviceModuleProperties +} + +// ZePfndevicegetmodulepropertiescb (ze_pfnDeviceGetModulePropertiesCb_t) Callback function-pointer for zeDeviceGetModuleProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetmodulepropertiescb uintptr + +// ZeDeviceGetCommandQueueGroupPropertiesParams (ze_device_get_command_queue_group_properties_params_t) Callback function parameters for zeDeviceGetCommandQueueGroupProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetCommandQueueGroupPropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppcount **uint32 + Ppcommandqueuegroupproperties **ZeCommandQueueGroupProperties +} + +// ZePfndevicegetcommandqueuegrouppropertiescb (ze_pfnDeviceGetCommandQueueGroupPropertiesCb_t) Callback function-pointer for zeDeviceGetCommandQueueGroupProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetcommandqueuegrouppropertiescb uintptr + +// ZeDeviceGetMemoryPropertiesParams (ze_device_get_memory_properties_params_t) Callback function parameters for zeDeviceGetMemoryProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetMemoryPropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppcount **uint32 + Ppmemproperties **ZeDeviceMemoryProperties +} + +// ZePfndevicegetmemorypropertiescb (ze_pfnDeviceGetMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetmemorypropertiescb uintptr + +// ZeDeviceGetMemoryAccessPropertiesParams (ze_device_get_memory_access_properties_params_t) Callback function parameters for zeDeviceGetMemoryAccessProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetMemoryAccessPropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppmemaccessproperties **ZeDeviceMemoryAccessProperties +} + +// ZePfndevicegetmemoryaccesspropertiescb (ze_pfnDeviceGetMemoryAccessPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryAccessProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetmemoryaccesspropertiescb uintptr + +// ZeDeviceGetCachePropertiesParams (ze_device_get_cache_properties_params_t) Callback function parameters for zeDeviceGetCacheProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetCachePropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppcount **uint32 + Ppcacheproperties **ZeDeviceCacheProperties +} + +// ZePfndevicegetcachepropertiescb (ze_pfnDeviceGetCachePropertiesCb_t) Callback function-pointer for zeDeviceGetCacheProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetcachepropertiescb uintptr + +// ZeDeviceGetImagePropertiesParams (ze_device_get_image_properties_params_t) Callback function parameters for zeDeviceGetImageProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetImagePropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppimageproperties **ZeDeviceImageProperties +} + +// ZePfndevicegetimagepropertiescb (ze_pfnDeviceGetImagePropertiesCb_t) Callback function-pointer for zeDeviceGetImageProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetimagepropertiescb uintptr + +// ZeDeviceGetExternalMemoryPropertiesParams (ze_device_get_external_memory_properties_params_t) Callback function parameters for zeDeviceGetExternalMemoryProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetExternalMemoryPropertiesParams struct { + Phdevice *ZeDeviceHandle + Ppexternalmemoryproperties **ZeDeviceExternalMemoryProperties +} + +// ZePfndevicegetexternalmemorypropertiescb (ze_pfnDeviceGetExternalMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetExternalMemoryProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetexternalmemorypropertiescb uintptr + +// ZeDeviceGetP2PPropertiesParams (ze_device_get_p2_p_properties_params_t) Callback function parameters for zeDeviceGetP2PProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetP2PPropertiesParams struct { + Phdevice *ZeDeviceHandle + Phpeerdevice *ZeDeviceHandle + Ppp2pproperties **ZeDeviceP2pProperties +} + +// ZePfndevicegetp2ppropertiescb (ze_pfnDeviceGetP2PPropertiesCb_t) Callback function-pointer for zeDeviceGetP2PProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetp2ppropertiescb uintptr + +// ZeDeviceCanAccessPeerParams (ze_device_can_access_peer_params_t) Callback function parameters for zeDeviceCanAccessPeer +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceCanAccessPeerParams struct { + Phdevice *ZeDeviceHandle + Phpeerdevice *ZeDeviceHandle + Pvalue **ZeBool +} + +// ZePfndevicecanaccesspeercb (ze_pfnDeviceCanAccessPeerCb_t) Callback function-pointer for zeDeviceCanAccessPeer +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicecanaccesspeercb uintptr + +// ZeDeviceGetStatusParams (ze_device_get_status_params_t) Callback function parameters for zeDeviceGetStatus +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeDeviceGetStatusParams struct { + Phdevice *ZeDeviceHandle +} + +// ZePfndevicegetstatuscb (ze_pfnDeviceGetStatusCb_t) Callback function-pointer for zeDeviceGetStatus +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfndevicegetstatuscb uintptr + +// ZeDeviceCallbacks (ze_device_callbacks_t) Table of Device callback functions pointers +type ZeDeviceCallbacks struct { + Pfngetcb ZePfndevicegetcb + Pfngetsubdevicescb ZePfndevicegetsubdevicescb + Pfngetpropertiescb ZePfndevicegetpropertiescb + Pfngetcomputepropertiescb ZePfndevicegetcomputepropertiescb + Pfngetmodulepropertiescb ZePfndevicegetmodulepropertiescb + Pfngetcommandqueuegrouppropertiescb ZePfndevicegetcommandqueuegrouppropertiescb + Pfngetmemorypropertiescb ZePfndevicegetmemorypropertiescb + Pfngetmemoryaccesspropertiescb ZePfndevicegetmemoryaccesspropertiescb + Pfngetcachepropertiescb ZePfndevicegetcachepropertiescb + Pfngetimagepropertiescb ZePfndevicegetimagepropertiescb + Pfngetexternalmemorypropertiescb ZePfndevicegetexternalmemorypropertiescb + Pfngetp2ppropertiescb ZePfndevicegetp2ppropertiescb + Pfncanaccesspeercb ZePfndevicecanaccesspeercb + Pfngetstatuscb ZePfndevicegetstatuscb +} + +// ZeContextCreateParams (ze_context_create_params_t) Callback function parameters for zeContextCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextCreateParams struct { + Phdriver *ZeDriverHandle + Pdesc **ZeContextDesc + Pphcontext **ZeContextHandle +} + +// ZePfncontextcreatecb (ze_pfnContextCreateCb_t) Callback function-pointer for zeContextCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextcreatecb uintptr + +// ZeContextDestroyParams (ze_context_destroy_params_t) Callback function parameters for zeContextDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextDestroyParams struct { + Phcontext *ZeContextHandle +} + +// ZePfncontextdestroycb (ze_pfnContextDestroyCb_t) Callback function-pointer for zeContextDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextdestroycb uintptr + +// ZeContextGetStatusParams (ze_context_get_status_params_t) Callback function parameters for zeContextGetStatus +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextGetStatusParams struct { + Phcontext *ZeContextHandle +} + +// ZePfncontextgetstatuscb (ze_pfnContextGetStatusCb_t) Callback function-pointer for zeContextGetStatus +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextgetstatuscb uintptr + +// ZeContextSystemBarrierParams (ze_context_system_barrier_params_t) Callback function parameters for zeContextSystemBarrier +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextSystemBarrierParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle +} + +// ZePfncontextsystembarriercb (ze_pfnContextSystemBarrierCb_t) Callback function-pointer for zeContextSystemBarrier +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextsystembarriercb uintptr + +// ZeContextMakeMemoryResidentParams (ze_context_make_memory_resident_params_t) Callback function parameters for zeContextMakeMemoryResident +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextMakeMemoryResidentParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr +} + +// ZePfncontextmakememoryresidentcb (ze_pfnContextMakeMemoryResidentCb_t) Callback function-pointer for zeContextMakeMemoryResident +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextmakememoryresidentcb uintptr + +// ZeContextEvictMemoryParams (ze_context_evict_memory_params_t) Callback function parameters for zeContextEvictMemory +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextEvictMemoryParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr +} + +// ZePfncontextevictmemorycb (ze_pfnContextEvictMemoryCb_t) Callback function-pointer for zeContextEvictMemory +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextevictmemorycb uintptr + +// ZeContextMakeImageResidentParams (ze_context_make_image_resident_params_t) Callback function parameters for zeContextMakeImageResident +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextMakeImageResidentParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Phimage *ZeImageHandle +} + +// ZePfncontextmakeimageresidentcb (ze_pfnContextMakeImageResidentCb_t) Callback function-pointer for zeContextMakeImageResident +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextmakeimageresidentcb uintptr + +// ZeContextEvictImageParams (ze_context_evict_image_params_t) Callback function parameters for zeContextEvictImage +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeContextEvictImageParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Phimage *ZeImageHandle +} + +// ZePfncontextevictimagecb (ze_pfnContextEvictImageCb_t) Callback function-pointer for zeContextEvictImage +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncontextevictimagecb uintptr + +// ZeContextCallbacks (ze_context_callbacks_t) Table of Context callback functions pointers +type ZeContextCallbacks struct { + Pfncreatecb ZePfncontextcreatecb + Pfndestroycb ZePfncontextdestroycb + Pfngetstatuscb ZePfncontextgetstatuscb + Pfnsystembarriercb ZePfncontextsystembarriercb + Pfnmakememoryresidentcb ZePfncontextmakememoryresidentcb + Pfnevictmemorycb ZePfncontextevictmemorycb + Pfnmakeimageresidentcb ZePfncontextmakeimageresidentcb + Pfnevictimagecb ZePfncontextevictimagecb +} + +// ZeCommandQueueCreateParams (ze_command_queue_create_params_t) Callback function parameters for zeCommandQueueCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandQueueCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeCommandQueueDesc + Pphcommandqueue **ZeCommandQueueHandle +} + +// ZePfncommandqueuecreatecb (ze_pfnCommandQueueCreateCb_t) Callback function-pointer for zeCommandQueueCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandqueuecreatecb uintptr + +// ZeCommandQueueDestroyParams (ze_command_queue_destroy_params_t) Callback function parameters for zeCommandQueueDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandQueueDestroyParams struct { + Phcommandqueue *ZeCommandQueueHandle +} + +// ZePfncommandqueuedestroycb (ze_pfnCommandQueueDestroyCb_t) Callback function-pointer for zeCommandQueueDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandqueuedestroycb uintptr + +// ZeCommandQueueExecuteCommandListsParams (ze_command_queue_execute_command_lists_params_t) Callback function parameters for zeCommandQueueExecuteCommandLists +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandQueueExecuteCommandListsParams struct { + Phcommandqueue *ZeCommandQueueHandle + Pnumcommandlists *uint32 + Pphcommandlists **ZeCommandListHandle + Phfence *ZeFenceHandle +} + +// ZePfncommandqueueexecutecommandlistscb (ze_pfnCommandQueueExecuteCommandListsCb_t) Callback function-pointer for zeCommandQueueExecuteCommandLists +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandqueueexecutecommandlistscb uintptr + +// ZeCommandQueueSynchronizeParams (ze_command_queue_synchronize_params_t) Callback function parameters for zeCommandQueueSynchronize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandQueueSynchronizeParams struct { + Phcommandqueue *ZeCommandQueueHandle + Ptimeout *uint64 +} + +// ZePfncommandqueuesynchronizecb (ze_pfnCommandQueueSynchronizeCb_t) Callback function-pointer for zeCommandQueueSynchronize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandqueuesynchronizecb uintptr + +// ZeCommandQueueCallbacks (ze_command_queue_callbacks_t) Table of CommandQueue callback functions pointers +type ZeCommandQueueCallbacks struct { + Pfncreatecb ZePfncommandqueuecreatecb + Pfndestroycb ZePfncommandqueuedestroycb + Pfnexecutecommandlistscb ZePfncommandqueueexecutecommandlistscb + Pfnsynchronizecb ZePfncommandqueuesynchronizecb +} + +// ZeCommandListCreateParams (ze_command_list_create_params_t) Callback function parameters for zeCommandListCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeCommandListDesc + Pphcommandlist **ZeCommandListHandle +} + +// ZePfncommandlistcreatecb (ze_pfnCommandListCreateCb_t) Callback function-pointer for zeCommandListCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistcreatecb uintptr + +// ZeCommandListCreateImmediateParams (ze_command_list_create_immediate_params_t) Callback function parameters for zeCommandListCreateImmediate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListCreateImmediateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Paltdesc **ZeCommandQueueDesc + Pphcommandlist **ZeCommandListHandle +} + +// ZePfncommandlistcreateimmediatecb (ze_pfnCommandListCreateImmediateCb_t) Callback function-pointer for zeCommandListCreateImmediate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistcreateimmediatecb uintptr + +// ZeCommandListDestroyParams (ze_command_list_destroy_params_t) Callback function parameters for zeCommandListDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListDestroyParams struct { + Phcommandlist *ZeCommandListHandle +} + +// ZePfncommandlistdestroycb (ze_pfnCommandListDestroyCb_t) Callback function-pointer for zeCommandListDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistdestroycb uintptr + +// ZeCommandListCloseParams (ze_command_list_close_params_t) Callback function parameters for zeCommandListClose +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListCloseParams struct { + Phcommandlist *ZeCommandListHandle +} + +// ZePfncommandlistclosecb (ze_pfnCommandListCloseCb_t) Callback function-pointer for zeCommandListClose +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistclosecb uintptr + +// ZeCommandListResetParams (ze_command_list_reset_params_t) Callback function parameters for zeCommandListReset +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListResetParams struct { + Phcommandlist *ZeCommandListHandle +} + +// ZePfncommandlistresetcb (ze_pfnCommandListResetCb_t) Callback function-pointer for zeCommandListReset +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistresetcb uintptr + +// ZeCommandListAppendWriteGlobalTimestampParams (ze_command_list_append_write_global_timestamp_params_t) Callback function parameters for zeCommandListAppendWriteGlobalTimestamp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendWriteGlobalTimestampParams struct { + Phcommandlist *ZeCommandListHandle + Pdstptr **uint64 + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendwriteglobaltimestampcb (ze_pfnCommandListAppendWriteGlobalTimestampCb_t) Callback function-pointer for zeCommandListAppendWriteGlobalTimestamp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendwriteglobaltimestampcb uintptr + +// ZeCommandListAppendBarrierParams (ze_command_list_append_barrier_params_t) Callback function parameters for zeCommandListAppendBarrier +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendBarrierParams struct { + Phcommandlist *ZeCommandListHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendbarriercb (ze_pfnCommandListAppendBarrierCb_t) Callback function-pointer for zeCommandListAppendBarrier +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendbarriercb uintptr + +// ZeCommandListAppendMemoryRangesBarrierParams (ze_command_list_append_memory_ranges_barrier_params_t) Callback function parameters for zeCommandListAppendMemoryRangesBarrier +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryRangesBarrierParams struct { + Phcommandlist *ZeCommandListHandle + Pnumranges *uint32 + Pprangesizes **uintptr + Ppranges **unsafe.Pointer + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendmemoryrangesbarriercb (ze_pfnCommandListAppendMemoryRangesBarrierCb_t) Callback function-pointer for zeCommandListAppendMemoryRangesBarrier +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemoryrangesbarriercb uintptr + +// ZeCommandListAppendMemoryCopyParams (ze_command_list_append_memory_copy_params_t) Callback function parameters for zeCommandListAppendMemoryCopy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryCopyParams struct { + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Psrcptr *unsafe.Pointer + Psize *uintptr + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendmemorycopycb (ze_pfnCommandListAppendMemoryCopyCb_t) Callback function-pointer for zeCommandListAppendMemoryCopy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemorycopycb uintptr + +// ZeCommandListAppendMemoryFillParams (ze_command_list_append_memory_fill_params_t) Callback function parameters for zeCommandListAppendMemoryFill +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryFillParams struct { + Phcommandlist *ZeCommandListHandle + Pptr *unsafe.Pointer + Ppattern *unsafe.Pointer + PpatternSize *uintptr + Psize *uintptr + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendmemoryfillcb (ze_pfnCommandListAppendMemoryFillCb_t) Callback function-pointer for zeCommandListAppendMemoryFill +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemoryfillcb uintptr + +// ZeCommandListAppendMemoryCopyRegionParams (ze_command_list_append_memory_copy_region_params_t) Callback function parameters for zeCommandListAppendMemoryCopyRegion +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryCopyRegionParams struct { + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Pdstregion **ZeCopyRegion + Pdstpitch *uint32 + Pdstslicepitch *uint32 + Psrcptr *unsafe.Pointer + Psrcregion **ZeCopyRegion + Psrcpitch *uint32 + Psrcslicepitch *uint32 + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendmemorycopyregioncb (ze_pfnCommandListAppendMemoryCopyRegionCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyRegion +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemorycopyregioncb uintptr + +// ZeCommandListAppendMemoryCopyFromContextParams (ze_command_list_append_memory_copy_from_context_params_t) Callback function parameters for zeCommandListAppendMemoryCopyFromContext +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryCopyFromContextParams struct { + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Phcontextsrc *ZeContextHandle + Psrcptr *unsafe.Pointer + Psize *uintptr + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendmemorycopyfromcontextcb (ze_pfnCommandListAppendMemoryCopyFromContextCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyFromContext +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemorycopyfromcontextcb uintptr + +// ZeCommandListAppendImageCopyParams (ze_command_list_append_image_copy_params_t) Callback function parameters for zeCommandListAppendImageCopy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendImageCopyParams struct { + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Phsrcimage *ZeImageHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendimagecopycb (ze_pfnCommandListAppendImageCopyCb_t) Callback function-pointer for zeCommandListAppendImageCopy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendimagecopycb uintptr + +// ZeCommandListAppendImageCopyRegionParams (ze_command_list_append_image_copy_region_params_t) Callback function parameters for zeCommandListAppendImageCopyRegion +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendImageCopyRegionParams struct { + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Phsrcimage *ZeImageHandle + Ppdstregion **ZeImageRegion + Ppsrcregion **ZeImageRegion + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendimagecopyregioncb (ze_pfnCommandListAppendImageCopyRegionCb_t) Callback function-pointer for zeCommandListAppendImageCopyRegion +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendimagecopyregioncb uintptr + +// ZeCommandListAppendImageCopyToMemoryParams (ze_command_list_append_image_copy_to_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyToMemory +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendImageCopyToMemoryParams struct { + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Phsrcimage *ZeImageHandle + Ppsrcregion **ZeImageRegion + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendimagecopytomemorycb (ze_pfnCommandListAppendImageCopyToMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyToMemory +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendimagecopytomemorycb uintptr + +// ZeCommandListAppendImageCopyFromMemoryParams (ze_command_list_append_image_copy_from_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyFromMemory +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendImageCopyFromMemoryParams struct { + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Psrcptr *unsafe.Pointer + Ppdstregion **ZeImageRegion + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendimagecopyfrommemorycb (ze_pfnCommandListAppendImageCopyFromMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyFromMemory +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendimagecopyfrommemorycb uintptr + +// ZeCommandListAppendMemoryPrefetchParams (ze_command_list_append_memory_prefetch_params_t) Callback function parameters for zeCommandListAppendMemoryPrefetch +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemoryPrefetchParams struct { + Phcommandlist *ZeCommandListHandle + Pptr *unsafe.Pointer + Psize *uintptr +} + +// ZePfncommandlistappendmemoryprefetchcb (ze_pfnCommandListAppendMemoryPrefetchCb_t) Callback function-pointer for zeCommandListAppendMemoryPrefetch +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemoryprefetchcb uintptr + +// ZeCommandListAppendMemAdviseParams (ze_command_list_append_mem_advise_params_t) Callback function parameters for zeCommandListAppendMemAdvise +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendMemAdviseParams struct { + Phcommandlist *ZeCommandListHandle + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr + Padvice *ZeMemoryAdvice +} + +// ZePfncommandlistappendmemadvisecb (ze_pfnCommandListAppendMemAdviseCb_t) Callback function-pointer for zeCommandListAppendMemAdvise +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendmemadvisecb uintptr + +// ZeCommandListAppendSignalEventParams (ze_command_list_append_signal_event_params_t) Callback function parameters for zeCommandListAppendSignalEvent +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendSignalEventParams struct { + Phcommandlist *ZeCommandListHandle + Phevent *ZeEventHandle +} + +// ZePfncommandlistappendsignaleventcb (ze_pfnCommandListAppendSignalEventCb_t) Callback function-pointer for zeCommandListAppendSignalEvent +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendsignaleventcb uintptr + +// ZeCommandListAppendWaitOnEventsParams (ze_command_list_append_wait_on_events_params_t) Callback function parameters for zeCommandListAppendWaitOnEvents +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendWaitOnEventsParams struct { + Phcommandlist *ZeCommandListHandle + Pnumevents *uint32 + Pphevents **ZeEventHandle +} + +// ZePfncommandlistappendwaitoneventscb (ze_pfnCommandListAppendWaitOnEventsCb_t) Callback function-pointer for zeCommandListAppendWaitOnEvents +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendwaitoneventscb uintptr + +// ZeCommandListAppendEventResetParams (ze_command_list_append_event_reset_params_t) Callback function parameters for zeCommandListAppendEventReset +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendEventResetParams struct { + Phcommandlist *ZeCommandListHandle + Phevent *ZeEventHandle +} + +// ZePfncommandlistappendeventresetcb (ze_pfnCommandListAppendEventResetCb_t) Callback function-pointer for zeCommandListAppendEventReset +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendeventresetcb uintptr + +// ZeCommandListAppendQueryKernelTimestampsParams (ze_command_list_append_query_kernel_timestamps_params_t) Callback function parameters for zeCommandListAppendQueryKernelTimestamps +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendQueryKernelTimestampsParams struct { + Phcommandlist *ZeCommandListHandle + Pnumevents *uint32 + Pphevents **ZeEventHandle + Pdstptr *unsafe.Pointer + Ppoffsets **uintptr + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendquerykerneltimestampscb (ze_pfnCommandListAppendQueryKernelTimestampsCb_t) Callback function-pointer for zeCommandListAppendQueryKernelTimestamps +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendquerykerneltimestampscb uintptr + +// ZeCommandListAppendLaunchKernelParams (ze_command_list_append_launch_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchKernel +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendLaunchKernelParams struct { + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle + Pplaunchfuncargs **ZeGroupCount + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendlaunchkernelcb (ze_pfnCommandListAppendLaunchKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchKernel +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendlaunchkernelcb uintptr + +// ZeCommandListAppendLaunchCooperativeKernelParams (ze_command_list_append_launch_cooperative_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchCooperativeKernel +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendLaunchCooperativeKernelParams struct { + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle + Pplaunchfuncargs **ZeGroupCount + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendlaunchcooperativekernelcb (ze_pfnCommandListAppendLaunchCooperativeKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchCooperativeKernel +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendlaunchcooperativekernelcb uintptr + +// ZeCommandListAppendLaunchKernelIndirectParams (ze_command_list_append_launch_kernel_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchKernelIndirect +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendLaunchKernelIndirectParams struct { + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle + Pplaunchargumentsbuffer **ZeGroupCount + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendlaunchkernelindirectcb (ze_pfnCommandListAppendLaunchKernelIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchKernelIndirect +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendlaunchkernelindirectcb uintptr + +// ZeCommandListAppendLaunchMultipleKernelsIndirectParams (ze_command_list_append_launch_multiple_kernels_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchMultipleKernelsIndirect +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeCommandListAppendLaunchMultipleKernelsIndirectParams struct { + Phcommandlist *ZeCommandListHandle + Pnumkernels *uint32 + Pphkernels **ZeKernelHandle + Ppcountbuffer **uint32 + Pplaunchargumentsbuffer **ZeGroupCount + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle +} + +// ZePfncommandlistappendlaunchmultiplekernelsindirectcb (ze_pfnCommandListAppendLaunchMultipleKernelsIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchMultipleKernelsIndirect +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfncommandlistappendlaunchmultiplekernelsindirectcb uintptr + +// ZeCommandListCallbacks (ze_command_list_callbacks_t) Table of CommandList callback functions pointers +type ZeCommandListCallbacks struct { + Pfncreatecb ZePfncommandlistcreatecb + Pfncreateimmediatecb ZePfncommandlistcreateimmediatecb + Pfndestroycb ZePfncommandlistdestroycb + Pfnclosecb ZePfncommandlistclosecb + Pfnresetcb ZePfncommandlistresetcb + Pfnappendwriteglobaltimestampcb ZePfncommandlistappendwriteglobaltimestampcb + Pfnappendbarriercb ZePfncommandlistappendbarriercb + Pfnappendmemoryrangesbarriercb ZePfncommandlistappendmemoryrangesbarriercb + Pfnappendmemorycopycb ZePfncommandlistappendmemorycopycb + Pfnappendmemoryfillcb ZePfncommandlistappendmemoryfillcb + Pfnappendmemorycopyregioncb ZePfncommandlistappendmemorycopyregioncb + Pfnappendmemorycopyfromcontextcb ZePfncommandlistappendmemorycopyfromcontextcb + Pfnappendimagecopycb ZePfncommandlistappendimagecopycb + Pfnappendimagecopyregioncb ZePfncommandlistappendimagecopyregioncb + Pfnappendimagecopytomemorycb ZePfncommandlistappendimagecopytomemorycb + Pfnappendimagecopyfrommemorycb ZePfncommandlistappendimagecopyfrommemorycb + Pfnappendmemoryprefetchcb ZePfncommandlistappendmemoryprefetchcb + Pfnappendmemadvisecb ZePfncommandlistappendmemadvisecb + Pfnappendsignaleventcb ZePfncommandlistappendsignaleventcb + Pfnappendwaitoneventscb ZePfncommandlistappendwaitoneventscb + Pfnappendeventresetcb ZePfncommandlistappendeventresetcb + Pfnappendquerykerneltimestampscb ZePfncommandlistappendquerykerneltimestampscb + Pfnappendlaunchkernelcb ZePfncommandlistappendlaunchkernelcb + Pfnappendlaunchcooperativekernelcb ZePfncommandlistappendlaunchcooperativekernelcb + Pfnappendlaunchkernelindirectcb ZePfncommandlistappendlaunchkernelindirectcb + Pfnappendlaunchmultiplekernelsindirectcb ZePfncommandlistappendlaunchmultiplekernelsindirectcb +} + +// ZeImageGetPropertiesParams (ze_image_get_properties_params_t) Callback function parameters for zeImageGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeImageGetPropertiesParams struct { + Phdevice *ZeDeviceHandle + Pdesc **ZeImageDesc + Ppimageproperties **ZeImageProperties +} + +// ZePfnimagegetpropertiescb (ze_pfnImageGetPropertiesCb_t) Callback function-pointer for zeImageGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnimagegetpropertiescb uintptr + +// ZeImageCreateParams (ze_image_create_params_t) Callback function parameters for zeImageCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeImageCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeImageDesc + Pphimage **ZeImageHandle +} + +// ZePfnimagecreatecb (ze_pfnImageCreateCb_t) Callback function-pointer for zeImageCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnimagecreatecb uintptr + +// ZeImageDestroyParams (ze_image_destroy_params_t) Callback function parameters for zeImageDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeImageDestroyParams struct { + Phimage *ZeImageHandle +} + +// ZePfnimagedestroycb (ze_pfnImageDestroyCb_t) Callback function-pointer for zeImageDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnimagedestroycb uintptr + +// ZeImageCallbacks (ze_image_callbacks_t) Table of Image callback functions pointers +type ZeImageCallbacks struct { + Pfngetpropertiescb ZePfnimagegetpropertiescb + Pfncreatecb ZePfnimagecreatecb + Pfndestroycb ZePfnimagedestroycb +} + +// ZeMemAllocSharedParams (ze_mem_alloc_shared_params_t) Callback function parameters for zeMemAllocShared +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemAllocSharedParams struct { + Phcontext *ZeContextHandle + PdeviceDesc **ZeDeviceMemAllocDesc + PhostDesc **ZeHostMemAllocDesc + Psize *uintptr + Palignment *uintptr + Phdevice *ZeDeviceHandle + Ppptr **unsafe.Pointer +} + +// ZePfnmemallocsharedcb (ze_pfnMemAllocSharedCb_t) Callback function-pointer for zeMemAllocShared +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemallocsharedcb uintptr + +// ZeMemAllocDeviceParams (ze_mem_alloc_device_params_t) Callback function parameters for zeMemAllocDevice +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemAllocDeviceParams struct { + Phcontext *ZeContextHandle + PdeviceDesc **ZeDeviceMemAllocDesc + Psize *uintptr + Palignment *uintptr + Phdevice *ZeDeviceHandle + Ppptr **unsafe.Pointer +} + +// ZePfnmemallocdevicecb (ze_pfnMemAllocDeviceCb_t) Callback function-pointer for zeMemAllocDevice +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemallocdevicecb uintptr + +// ZeMemAllocHostParams (ze_mem_alloc_host_params_t) Callback function parameters for zeMemAllocHost +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemAllocHostParams struct { + Phcontext *ZeContextHandle + PhostDesc **ZeHostMemAllocDesc + Psize *uintptr + Palignment *uintptr + Ppptr **unsafe.Pointer +} + +// ZePfnmemallochostcb (ze_pfnMemAllocHostCb_t) Callback function-pointer for zeMemAllocHost +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemallochostcb uintptr + +// ZeMemFreeParams (ze_mem_free_params_t) Callback function parameters for zeMemFree +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemFreeParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer +} + +// ZePfnmemfreecb (ze_pfnMemFreeCb_t) Callback function-pointer for zeMemFree +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemfreecb uintptr + +// ZeMemGetAllocPropertiesParams (ze_mem_get_alloc_properties_params_t) Callback function parameters for zeMemGetAllocProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemGetAllocPropertiesParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Ppmemallocproperties **ZeMemoryAllocationProperties + Pphdevice **ZeDeviceHandle +} + +// ZePfnmemgetallocpropertiescb (ze_pfnMemGetAllocPropertiesCb_t) Callback function-pointer for zeMemGetAllocProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemgetallocpropertiescb uintptr + +// ZeMemGetAddressRangeParams (ze_mem_get_address_range_params_t) Callback function parameters for zeMemGetAddressRange +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemGetAddressRangeParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Ppbase **unsafe.Pointer + Ppsize **uintptr +} + +// ZePfnmemgetaddressrangecb (ze_pfnMemGetAddressRangeCb_t) Callback function-pointer for zeMemGetAddressRange +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemgetaddressrangecb uintptr + +// ZeMemGetIpcHandleParams (ze_mem_get_ipc_handle_params_t) Callback function parameters for zeMemGetIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemGetIpcHandleParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Ppipchandle **ZeIpcMemHandle +} + +// ZePfnmemgetipchandlecb (ze_pfnMemGetIpcHandleCb_t) Callback function-pointer for zeMemGetIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemgetipchandlecb uintptr + +// ZeMemOpenIpcHandleParams (ze_mem_open_ipc_handle_params_t) Callback function parameters for zeMemOpenIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemOpenIpcHandleParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Phandle *ZeIpcMemHandle + Pflags *ZeIpcMemoryFlags + Ppptr **unsafe.Pointer +} + +// ZePfnmemopenipchandlecb (ze_pfnMemOpenIpcHandleCb_t) Callback function-pointer for zeMemOpenIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemopenipchandlecb uintptr + +// ZeMemCloseIpcHandleParams (ze_mem_close_ipc_handle_params_t) Callback function parameters for zeMemCloseIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeMemCloseIpcHandleParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer +} + +// ZePfnmemcloseipchandlecb (ze_pfnMemCloseIpcHandleCb_t) Callback function-pointer for zeMemCloseIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmemcloseipchandlecb uintptr + +// ZeMemCallbacks (ze_mem_callbacks_t) Table of Mem callback functions pointers +type ZeMemCallbacks struct { + Pfnallocsharedcb ZePfnmemallocsharedcb + Pfnallocdevicecb ZePfnmemallocdevicecb + Pfnallochostcb ZePfnmemallochostcb + Pfnfreecb ZePfnmemfreecb + Pfngetallocpropertiescb ZePfnmemgetallocpropertiescb + Pfngetaddressrangecb ZePfnmemgetaddressrangecb + Pfngetipchandlecb ZePfnmemgetipchandlecb + Pfnopenipchandlecb ZePfnmemopenipchandlecb + Pfncloseipchandlecb ZePfnmemcloseipchandlecb +} + +// ZeFenceCreateParams (ze_fence_create_params_t) Callback function parameters for zeFenceCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeFenceCreateParams struct { + Phcommandqueue *ZeCommandQueueHandle + Pdesc **ZeFenceDesc + Pphfence **ZeFenceHandle +} + +// ZePfnfencecreatecb (ze_pfnFenceCreateCb_t) Callback function-pointer for zeFenceCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnfencecreatecb uintptr + +// ZeFenceDestroyParams (ze_fence_destroy_params_t) Callback function parameters for zeFenceDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeFenceDestroyParams struct { + Phfence *ZeFenceHandle +} + +// ZePfnfencedestroycb (ze_pfnFenceDestroyCb_t) Callback function-pointer for zeFenceDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnfencedestroycb uintptr + +// ZeFenceHostSynchronizeParams (ze_fence_host_synchronize_params_t) Callback function parameters for zeFenceHostSynchronize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeFenceHostSynchronizeParams struct { + Phfence *ZeFenceHandle + Ptimeout *uint64 +} + +// ZePfnfencehostsynchronizecb (ze_pfnFenceHostSynchronizeCb_t) Callback function-pointer for zeFenceHostSynchronize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnfencehostsynchronizecb uintptr + +// ZeFenceQueryStatusParams (ze_fence_query_status_params_t) Callback function parameters for zeFenceQueryStatus +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeFenceQueryStatusParams struct { + Phfence *ZeFenceHandle +} + +// ZePfnfencequerystatuscb (ze_pfnFenceQueryStatusCb_t) Callback function-pointer for zeFenceQueryStatus +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnfencequerystatuscb uintptr + +// ZeFenceResetParams (ze_fence_reset_params_t) Callback function parameters for zeFenceReset +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeFenceResetParams struct { + Phfence *ZeFenceHandle +} + +// ZePfnfenceresetcb (ze_pfnFenceResetCb_t) Callback function-pointer for zeFenceReset +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnfenceresetcb uintptr + +// ZeFenceCallbacks (ze_fence_callbacks_t) Table of Fence callback functions pointers +type ZeFenceCallbacks struct { + Pfncreatecb ZePfnfencecreatecb + Pfndestroycb ZePfnfencedestroycb + Pfnhostsynchronizecb ZePfnfencehostsynchronizecb + Pfnquerystatuscb ZePfnfencequerystatuscb + Pfnresetcb ZePfnfenceresetcb +} + +// ZeEventPoolCreateParams (ze_event_pool_create_params_t) Callback function parameters for zeEventPoolCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventPoolCreateParams struct { + Phcontext *ZeContextHandle + Pdesc **ZeEventPoolDesc + Pnumdevices *uint32 + Pphdevices **ZeDeviceHandle + Ppheventpool **ZeEventPoolHandle +} + +// ZePfneventpoolcreatecb (ze_pfnEventPoolCreateCb_t) Callback function-pointer for zeEventPoolCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventpoolcreatecb uintptr + +// ZeEventPoolDestroyParams (ze_event_pool_destroy_params_t) Callback function parameters for zeEventPoolDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventPoolDestroyParams struct { + Pheventpool *ZeEventPoolHandle +} + +// ZePfneventpooldestroycb (ze_pfnEventPoolDestroyCb_t) Callback function-pointer for zeEventPoolDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventpooldestroycb uintptr + +// ZeEventPoolGetIpcHandleParams (ze_event_pool_get_ipc_handle_params_t) Callback function parameters for zeEventPoolGetIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventPoolGetIpcHandleParams struct { + Pheventpool *ZeEventPoolHandle + Pphipc **ZeIpcEventPoolHandle +} + +// ZePfneventpoolgetipchandlecb (ze_pfnEventPoolGetIpcHandleCb_t) Callback function-pointer for zeEventPoolGetIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventpoolgetipchandlecb uintptr + +// ZeEventPoolOpenIpcHandleParams (ze_event_pool_open_ipc_handle_params_t) Callback function parameters for zeEventPoolOpenIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventPoolOpenIpcHandleParams struct { + Phcontext *ZeContextHandle + Phipc *ZeIpcEventPoolHandle + Ppheventpool **ZeEventPoolHandle +} + +// ZePfneventpoolopenipchandlecb (ze_pfnEventPoolOpenIpcHandleCb_t) Callback function-pointer for zeEventPoolOpenIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventpoolopenipchandlecb uintptr + +// ZeEventPoolCloseIpcHandleParams (ze_event_pool_close_ipc_handle_params_t) Callback function parameters for zeEventPoolCloseIpcHandle +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventPoolCloseIpcHandleParams struct { + Pheventpool *ZeEventPoolHandle +} + +// ZePfneventpoolcloseipchandlecb (ze_pfnEventPoolCloseIpcHandleCb_t) Callback function-pointer for zeEventPoolCloseIpcHandle +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventpoolcloseipchandlecb uintptr + +// ZeEventPoolCallbacks (ze_event_pool_callbacks_t) Table of EventPool callback functions pointers +type ZeEventPoolCallbacks struct { + Pfncreatecb ZePfneventpoolcreatecb + Pfndestroycb ZePfneventpooldestroycb + Pfngetipchandlecb ZePfneventpoolgetipchandlecb + Pfnopenipchandlecb ZePfneventpoolopenipchandlecb + Pfncloseipchandlecb ZePfneventpoolcloseipchandlecb +} + +// ZeEventCreateParams (ze_event_create_params_t) Callback function parameters for zeEventCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventCreateParams struct { + Pheventpool *ZeEventPoolHandle + Pdesc **ZeEventDesc + Pphevent **ZeEventHandle +} + +// ZePfneventcreatecb (ze_pfnEventCreateCb_t) Callback function-pointer for zeEventCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventcreatecb uintptr + +// ZeEventDestroyParams (ze_event_destroy_params_t) Callback function parameters for zeEventDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventDestroyParams struct { + Phevent *ZeEventHandle +} + +// ZePfneventdestroycb (ze_pfnEventDestroyCb_t) Callback function-pointer for zeEventDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventdestroycb uintptr + +// ZeEventHostSignalParams (ze_event_host_signal_params_t) Callback function parameters for zeEventHostSignal +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventHostSignalParams struct { + Phevent *ZeEventHandle +} + +// ZePfneventhostsignalcb (ze_pfnEventHostSignalCb_t) Callback function-pointer for zeEventHostSignal +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventhostsignalcb uintptr + +// ZeEventHostSynchronizeParams (ze_event_host_synchronize_params_t) Callback function parameters for zeEventHostSynchronize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventHostSynchronizeParams struct { + Phevent *ZeEventHandle + Ptimeout *uint64 +} + +// ZePfneventhostsynchronizecb (ze_pfnEventHostSynchronizeCb_t) Callback function-pointer for zeEventHostSynchronize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventhostsynchronizecb uintptr + +// ZeEventQueryStatusParams (ze_event_query_status_params_t) Callback function parameters for zeEventQueryStatus +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventQueryStatusParams struct { + Phevent *ZeEventHandle +} + +// ZePfneventquerystatuscb (ze_pfnEventQueryStatusCb_t) Callback function-pointer for zeEventQueryStatus +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventquerystatuscb uintptr + +// ZeEventHostResetParams (ze_event_host_reset_params_t) Callback function parameters for zeEventHostReset +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventHostResetParams struct { + Phevent *ZeEventHandle +} + +// ZePfneventhostresetcb (ze_pfnEventHostResetCb_t) Callback function-pointer for zeEventHostReset +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventhostresetcb uintptr + +// ZeEventQueryKernelTimestampParams (ze_event_query_kernel_timestamp_params_t) Callback function parameters for zeEventQueryKernelTimestamp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeEventQueryKernelTimestampParams struct { + Phevent *ZeEventHandle + Pdstptr **ZeKernelTimestampResult +} + +// ZePfneventquerykerneltimestampcb (ze_pfnEventQueryKernelTimestampCb_t) Callback function-pointer for zeEventQueryKernelTimestamp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfneventquerykerneltimestampcb uintptr + +// ZeEventCallbacks (ze_event_callbacks_t) Table of Event callback functions pointers +type ZeEventCallbacks struct { + Pfncreatecb ZePfneventcreatecb + Pfndestroycb ZePfneventdestroycb + Pfnhostsignalcb ZePfneventhostsignalcb + Pfnhostsynchronizecb ZePfneventhostsynchronizecb + Pfnquerystatuscb ZePfneventquerystatuscb + Pfnhostresetcb ZePfneventhostresetcb + Pfnquerykerneltimestampcb ZePfneventquerykerneltimestampcb +} + +// ZeModuleCreateParams (ze_module_create_params_t) Callback function parameters for zeModuleCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeModuleDesc + Pphmodule **ZeModuleHandle + Pphbuildlog **ZeModuleBuildLogHandle +} + +// ZePfnmodulecreatecb (ze_pfnModuleCreateCb_t) Callback function-pointer for zeModuleCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulecreatecb uintptr + +// ZeModuleDestroyParams (ze_module_destroy_params_t) Callback function parameters for zeModuleDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleDestroyParams struct { + Phmodule *ZeModuleHandle +} + +// ZePfnmoduledestroycb (ze_pfnModuleDestroyCb_t) Callback function-pointer for zeModuleDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmoduledestroycb uintptr + +// ZeModuleDynamicLinkParams (ze_module_dynamic_link_params_t) Callback function parameters for zeModuleDynamicLink +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleDynamicLinkParams struct { + Pnummodules *uint32 + Pphmodules **ZeModuleHandle + Pphlinklog **ZeModuleBuildLogHandle +} + +// ZePfnmoduledynamiclinkcb (ze_pfnModuleDynamicLinkCb_t) Callback function-pointer for zeModuleDynamicLink +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmoduledynamiclinkcb uintptr + +// ZeModuleGetNativeBinaryParams (ze_module_get_native_binary_params_t) Callback function parameters for zeModuleGetNativeBinary +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleGetNativeBinaryParams struct { + Phmodule *ZeModuleHandle + Ppsize **uintptr + Ppmodulenativebinary **uint8 +} + +// ZePfnmodulegetnativebinarycb (ze_pfnModuleGetNativeBinaryCb_t) Callback function-pointer for zeModuleGetNativeBinary +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulegetnativebinarycb uintptr + +// ZeModuleGetGlobalPointerParams (ze_module_get_global_pointer_params_t) Callback function parameters for zeModuleGetGlobalPointer +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleGetGlobalPointerParams struct { + Phmodule *ZeModuleHandle + Ppglobalname **byte + Ppsize **uintptr + Ppptr **unsafe.Pointer +} + +// ZePfnmodulegetglobalpointercb (ze_pfnModuleGetGlobalPointerCb_t) Callback function-pointer for zeModuleGetGlobalPointer +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulegetglobalpointercb uintptr + +// ZeModuleGetKernelNamesParams (ze_module_get_kernel_names_params_t) Callback function parameters for zeModuleGetKernelNames +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleGetKernelNamesParams struct { + Phmodule *ZeModuleHandle + Ppcount **uint32 + Ppnames ***byte +} + +// ZePfnmodulegetkernelnamescb (ze_pfnModuleGetKernelNamesCb_t) Callback function-pointer for zeModuleGetKernelNames +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulegetkernelnamescb uintptr + +// ZeModuleGetPropertiesParams (ze_module_get_properties_params_t) Callback function parameters for zeModuleGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleGetPropertiesParams struct { + Phmodule *ZeModuleHandle + Ppmoduleproperties **ZeModuleProperties +} + +// ZePfnmodulegetpropertiescb (ze_pfnModuleGetPropertiesCb_t) Callback function-pointer for zeModuleGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulegetpropertiescb uintptr + +// ZeModuleGetFunctionPointerParams (ze_module_get_function_pointer_params_t) Callback function parameters for zeModuleGetFunctionPointer +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleGetFunctionPointerParams struct { + Phmodule *ZeModuleHandle + Ppfunctionname **byte + Ppfnfunction **unsafe.Pointer +} + +// ZePfnmodulegetfunctionpointercb (ze_pfnModuleGetFunctionPointerCb_t) Callback function-pointer for zeModuleGetFunctionPointer +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulegetfunctionpointercb uintptr + +// ZeModuleCallbacks (ze_module_callbacks_t) Table of Module callback functions pointers +type ZeModuleCallbacks struct { + Pfncreatecb ZePfnmodulecreatecb + Pfndestroycb ZePfnmoduledestroycb + Pfndynamiclinkcb ZePfnmoduledynamiclinkcb + Pfngetnativebinarycb ZePfnmodulegetnativebinarycb + Pfngetglobalpointercb ZePfnmodulegetglobalpointercb + Pfngetkernelnamescb ZePfnmodulegetkernelnamescb + Pfngetpropertiescb ZePfnmodulegetpropertiescb + Pfngetfunctionpointercb ZePfnmodulegetfunctionpointercb +} + +// ZeModuleBuildLogDestroyParams (ze_module_build_log_destroy_params_t) Callback function parameters for zeModuleBuildLogDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleBuildLogDestroyParams struct { + Phmodulebuildlog *ZeModuleBuildLogHandle +} + +// ZePfnmodulebuildlogdestroycb (ze_pfnModuleBuildLogDestroyCb_t) Callback function-pointer for zeModuleBuildLogDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulebuildlogdestroycb uintptr + +// ZeModuleBuildLogGetStringParams (ze_module_build_log_get_string_params_t) Callback function parameters for zeModuleBuildLogGetString +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeModuleBuildLogGetStringParams struct { + Phmodulebuildlog *ZeModuleBuildLogHandle + Ppsize **uintptr + Ppbuildlog **byte +} + +// ZePfnmodulebuildloggetstringcb (ze_pfnModuleBuildLogGetStringCb_t) Callback function-pointer for zeModuleBuildLogGetString +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnmodulebuildloggetstringcb uintptr + +// ZeModuleBuildLogCallbacks (ze_module_build_log_callbacks_t) Table of ModuleBuildLog callback functions pointers +type ZeModuleBuildLogCallbacks struct { + Pfndestroycb ZePfnmodulebuildlogdestroycb + Pfngetstringcb ZePfnmodulebuildloggetstringcb +} + +// ZeKernelCreateParams (ze_kernel_create_params_t) Callback function parameters for zeKernelCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelCreateParams struct { + Phmodule *ZeModuleHandle + Pdesc **ZeKernelDesc + Pphkernel **ZeKernelHandle +} + +// ZePfnkernelcreatecb (ze_pfnKernelCreateCb_t) Callback function-pointer for zeKernelCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelcreatecb uintptr + +// ZeKernelDestroyParams (ze_kernel_destroy_params_t) Callback function parameters for zeKernelDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelDestroyParams struct { + Phkernel *ZeKernelHandle +} + +// ZePfnkerneldestroycb (ze_pfnKernelDestroyCb_t) Callback function-pointer for zeKernelDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkerneldestroycb uintptr + +// ZeKernelSetCacheConfigParams (ze_kernel_set_cache_config_params_t) Callback function parameters for zeKernelSetCacheConfig +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSetCacheConfigParams struct { + Phkernel *ZeKernelHandle + Pflags *ZeCacheConfigFlags +} + +// ZePfnkernelsetcacheconfigcb (ze_pfnKernelSetCacheConfigCb_t) Callback function-pointer for zeKernelSetCacheConfig +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsetcacheconfigcb uintptr + +// ZeKernelSetGroupSizeParams (ze_kernel_set_group_size_params_t) Callback function parameters for zeKernelSetGroupSize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSetGroupSizeParams struct { + Phkernel *ZeKernelHandle + Pgroupsizex *uint32 + Pgroupsizey *uint32 + Pgroupsizez *uint32 +} + +// ZePfnkernelsetgroupsizecb (ze_pfnKernelSetGroupSizeCb_t) Callback function-pointer for zeKernelSetGroupSize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsetgroupsizecb uintptr + +// ZeKernelSuggestGroupSizeParams (ze_kernel_suggest_group_size_params_t) Callback function parameters for zeKernelSuggestGroupSize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSuggestGroupSizeParams struct { + Phkernel *ZeKernelHandle + Pglobalsizex *uint32 + Pglobalsizey *uint32 + Pglobalsizez *uint32 + Pgroupsizex **uint32 + Pgroupsizey **uint32 + Pgroupsizez **uint32 +} + +// ZePfnkernelsuggestgroupsizecb (ze_pfnKernelSuggestGroupSizeCb_t) Callback function-pointer for zeKernelSuggestGroupSize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsuggestgroupsizecb uintptr + +// ZeKernelSuggestMaxCooperativeGroupCountParams (ze_kernel_suggest_max_cooperative_group_count_params_t) Callback function parameters for zeKernelSuggestMaxCooperativeGroupCount +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSuggestMaxCooperativeGroupCountParams struct { + Phkernel *ZeKernelHandle + Ptotalgroupcount **uint32 +} + +// ZePfnkernelsuggestmaxcooperativegroupcountcb (ze_pfnKernelSuggestMaxCooperativeGroupCountCb_t) Callback function-pointer for zeKernelSuggestMaxCooperativeGroupCount +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsuggestmaxcooperativegroupcountcb uintptr + +// ZeKernelSetArgumentValueParams (ze_kernel_set_argument_value_params_t) Callback function parameters for zeKernelSetArgumentValue +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSetArgumentValueParams struct { + Phkernel *ZeKernelHandle + Pargindex *uint32 + Pargsize *uintptr + Ppargvalue *unsafe.Pointer +} + +// ZePfnkernelsetargumentvaluecb (ze_pfnKernelSetArgumentValueCb_t) Callback function-pointer for zeKernelSetArgumentValue +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsetargumentvaluecb uintptr + +// ZeKernelSetIndirectAccessParams (ze_kernel_set_indirect_access_params_t) Callback function parameters for zeKernelSetIndirectAccess +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelSetIndirectAccessParams struct { + Phkernel *ZeKernelHandle + Pflags *ZeKernelIndirectAccessFlags +} + +// ZePfnkernelsetindirectaccesscb (ze_pfnKernelSetIndirectAccessCb_t) Callback function-pointer for zeKernelSetIndirectAccess +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelsetindirectaccesscb uintptr + +// ZeKernelGetIndirectAccessParams (ze_kernel_get_indirect_access_params_t) Callback function parameters for zeKernelGetIndirectAccess +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelGetIndirectAccessParams struct { + Phkernel *ZeKernelHandle + Ppflags **ZeKernelIndirectAccessFlags +} + +// ZePfnkernelgetindirectaccesscb (ze_pfnKernelGetIndirectAccessCb_t) Callback function-pointer for zeKernelGetIndirectAccess +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelgetindirectaccesscb uintptr + +// ZeKernelGetSourceAttributesParams (ze_kernel_get_source_attributes_params_t) Callback function parameters for zeKernelGetSourceAttributes +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelGetSourceAttributesParams struct { + Phkernel *ZeKernelHandle + Ppsize **uint32 + Ppstring ***byte +} + +// ZePfnkernelgetsourceattributescb (ze_pfnKernelGetSourceAttributesCb_t) Callback function-pointer for zeKernelGetSourceAttributes +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelgetsourceattributescb uintptr + +// ZeKernelGetPropertiesParams (ze_kernel_get_properties_params_t) Callback function parameters for zeKernelGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelGetPropertiesParams struct { + Phkernel *ZeKernelHandle + Ppkernelproperties **ZeKernelProperties +} + +// ZePfnkernelgetpropertiescb (ze_pfnKernelGetPropertiesCb_t) Callback function-pointer for zeKernelGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelgetpropertiescb uintptr + +// ZeKernelGetNameParams (ze_kernel_get_name_params_t) Callback function parameters for zeKernelGetName +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeKernelGetNameParams struct { + Phkernel *ZeKernelHandle + Ppsize **uintptr + Ppname **byte +} + +// ZePfnkernelgetnamecb (ze_pfnKernelGetNameCb_t) Callback function-pointer for zeKernelGetName +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnkernelgetnamecb uintptr + +// ZeKernelCallbacks (ze_kernel_callbacks_t) Table of Kernel callback functions pointers +type ZeKernelCallbacks struct { + Pfncreatecb ZePfnkernelcreatecb + Pfndestroycb ZePfnkerneldestroycb + Pfnsetcacheconfigcb ZePfnkernelsetcacheconfigcb + Pfnsetgroupsizecb ZePfnkernelsetgroupsizecb + Pfnsuggestgroupsizecb ZePfnkernelsuggestgroupsizecb + Pfnsuggestmaxcooperativegroupcountcb ZePfnkernelsuggestmaxcooperativegroupcountcb + Pfnsetargumentvaluecb ZePfnkernelsetargumentvaluecb + Pfnsetindirectaccesscb ZePfnkernelsetindirectaccesscb + Pfngetindirectaccesscb ZePfnkernelgetindirectaccesscb + Pfngetsourceattributescb ZePfnkernelgetsourceattributescb + Pfngetpropertiescb ZePfnkernelgetpropertiescb + Pfngetnamecb ZePfnkernelgetnamecb +} + +// ZeSamplerCreateParams (ze_sampler_create_params_t) Callback function parameters for zeSamplerCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeSamplerCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeSamplerDesc + Pphsampler **ZeSamplerHandle +} + +// ZePfnsamplercreatecb (ze_pfnSamplerCreateCb_t) Callback function-pointer for zeSamplerCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnsamplercreatecb uintptr + +// ZeSamplerDestroyParams (ze_sampler_destroy_params_t) Callback function parameters for zeSamplerDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeSamplerDestroyParams struct { + Phsampler *ZeSamplerHandle +} + +// ZePfnsamplerdestroycb (ze_pfnSamplerDestroyCb_t) Callback function-pointer for zeSamplerDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnsamplerdestroycb uintptr + +// ZeSamplerCallbacks (ze_sampler_callbacks_t) Table of Sampler callback functions pointers +type ZeSamplerCallbacks struct { + Pfncreatecb ZePfnsamplercreatecb + Pfndestroycb ZePfnsamplerdestroycb +} + +// ZePhysicalMemCreateParams (ze_physical_mem_create_params_t) Callback function parameters for zePhysicalMemCreate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZePhysicalMemCreateParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZePhysicalMemDesc + Pphphysicalmemory **ZePhysicalMemHandle +} + +// ZePfnphysicalmemcreatecb (ze_pfnPhysicalMemCreateCb_t) Callback function-pointer for zePhysicalMemCreate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnphysicalmemcreatecb uintptr + +// ZePhysicalMemDestroyParams (ze_physical_mem_destroy_params_t) Callback function parameters for zePhysicalMemDestroy +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZePhysicalMemDestroyParams struct { + Phcontext *ZeContextHandle + Phphysicalmemory *ZePhysicalMemHandle +} + +// ZePfnphysicalmemdestroycb (ze_pfnPhysicalMemDestroyCb_t) Callback function-pointer for zePhysicalMemDestroy +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnphysicalmemdestroycb uintptr + +// ZePhysicalMemCallbacks (ze_physical_mem_callbacks_t) Table of PhysicalMem callback functions pointers +type ZePhysicalMemCallbacks struct { + Pfncreatecb ZePfnphysicalmemcreatecb + Pfndestroycb ZePfnphysicalmemdestroycb +} + +// ZeVirtualMemReserveParams (ze_virtual_mem_reserve_params_t) Callback function parameters for zeVirtualMemReserve +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemReserveParams struct { + Phcontext *ZeContextHandle + Ppstart *unsafe.Pointer + Psize *uintptr + Ppptr **unsafe.Pointer +} + +// ZePfnvirtualmemreservecb (ze_pfnVirtualMemReserveCb_t) Callback function-pointer for zeVirtualMemReserve +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemreservecb uintptr + +// ZeVirtualMemFreeParams (ze_virtual_mem_free_params_t) Callback function parameters for zeVirtualMemFree +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemFreeParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr +} + +// ZePfnvirtualmemfreecb (ze_pfnVirtualMemFreeCb_t) Callback function-pointer for zeVirtualMemFree +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemfreecb uintptr + +// ZeVirtualMemQueryPageSizeParams (ze_virtual_mem_query_page_size_params_t) Callback function parameters for zeVirtualMemQueryPageSize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemQueryPageSizeParams struct { + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Psize *uintptr + Ppagesize **uintptr +} + +// ZePfnvirtualmemquerypagesizecb (ze_pfnVirtualMemQueryPageSizeCb_t) Callback function-pointer for zeVirtualMemQueryPageSize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemquerypagesizecb uintptr + +// ZeVirtualMemMapParams (ze_virtual_mem_map_params_t) Callback function parameters for zeVirtualMemMap +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemMapParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr + Phphysicalmemory *ZePhysicalMemHandle + Poffset *uintptr + Paccess *ZeMemoryAccessAttribute +} + +// ZePfnvirtualmemmapcb (ze_pfnVirtualMemMapCb_t) Callback function-pointer for zeVirtualMemMap +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemmapcb uintptr + +// ZeVirtualMemUnmapParams (ze_virtual_mem_unmap_params_t) Callback function parameters for zeVirtualMemUnmap +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemUnmapParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr +} + +// ZePfnvirtualmemunmapcb (ze_pfnVirtualMemUnmapCb_t) Callback function-pointer for zeVirtualMemUnmap +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemunmapcb uintptr + +// ZeVirtualMemSetAccessAttributeParams (ze_virtual_mem_set_access_attribute_params_t) Callback function parameters for zeVirtualMemSetAccessAttribute +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemSetAccessAttributeParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr + Paccess *ZeMemoryAccessAttribute +} + +// ZePfnvirtualmemsetaccessattributecb (ze_pfnVirtualMemSetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemSetAccessAttribute +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemsetaccessattributecb uintptr + +// ZeVirtualMemGetAccessAttributeParams (ze_virtual_mem_get_access_attribute_params_t) Callback function parameters for zeVirtualMemGetAccessAttribute +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +type ZeVirtualMemGetAccessAttributeParams struct { + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr + Paccess **ZeMemoryAccessAttribute + Poutsize **uintptr +} + +// ZePfnvirtualmemgetaccessattributecb (ze_pfnVirtualMemGetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemGetAccessAttribute +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// gozel warn: please use C function pointer loaded from C library! +type ZePfnvirtualmemgetaccessattributecb uintptr + +// ZeVirtualMemCallbacks (ze_virtual_mem_callbacks_t) Table of VirtualMem callback functions pointers +type ZeVirtualMemCallbacks struct { + Pfnreservecb ZePfnvirtualmemreservecb + Pfnfreecb ZePfnvirtualmemfreecb + Pfnquerypagesizecb ZePfnvirtualmemquerypagesizecb + Pfnmapcb ZePfnvirtualmemmapcb + Pfnunmapcb ZePfnvirtualmemunmapcb + Pfnsetaccessattributecb ZePfnvirtualmemsetaccessattributecb + Pfngetaccessattributecb ZePfnvirtualmemgetaccessattributecb +} + +// ZeCallbacks (ze_callbacks_t) Container for all callbacks +type ZeCallbacks struct { + Global ZeGlobalCallbacks + Driver ZeDriverCallbacks + Device ZeDeviceCallbacks + Context ZeContextCallbacks + Commandqueue ZeCommandQueueCallbacks + Commandlist ZeCommandListCallbacks + Fence ZeFenceCallbacks + Eventpool ZeEventPoolCallbacks + Event ZeEventCallbacks + Image ZeImageCallbacks + Module ZeModuleCallbacks + Modulebuildlog ZeModuleBuildLogCallbacks + Kernel ZeKernelCallbacks + Sampler ZeSamplerCallbacks + Physicalmem ZePhysicalMemCallbacks + Mem ZeMemCallbacks + Virtualmem ZeVirtualMemCallbacks +} + diff --git a/core/commandListClone.go b/core/commandListClone.go new file mode 100644 index 0000000..92ea8a6 --- /dev/null +++ b/core/commandListClone.go @@ -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))) +} + diff --git a/core/counterbasedeventpool.go b/core/counterbasedeventpool.go new file mode 100644 index 0000000..dd1d49b --- /dev/null +++ b/core/counterbasedeventpool.go @@ -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. + +} + diff --git a/core/deviceLUID.go b/core/deviceLUID.go new file mode 100644 index 0000000..05967fb --- /dev/null +++ b/core/deviceLUID.go @@ -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. + +} + diff --git a/core/deviceVectorSizes.go b/core/deviceVectorSizes.go new file mode 100644 index 0000000..dd534eb --- /dev/null +++ b/core/deviceVectorSizes.go @@ -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))) +} + diff --git a/core/deviceipversion.go b/core/deviceipversion.go new file mode 100644 index 0000000..02678d0 --- /dev/null +++ b/core/deviceipversion.go @@ -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. + +} + diff --git a/core/deviceusablememproperties.go b/core/deviceusablememproperties.go new file mode 100644 index 0000000..8948201 --- /dev/null +++ b/core/deviceusablememproperties.go @@ -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. + +} + diff --git a/core/eventQueryKernelTimestamps.go b/core/eventQueryKernelTimestamps.go new file mode 100644 index 0000000..dfc3aa8 --- /dev/null +++ b/core/eventQueryKernelTimestamps.go @@ -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))) +} + diff --git a/core/eventquerytimestamps.go b/core/eventquerytimestamps.go new file mode 100644 index 0000000..aa4666f --- /dev/null +++ b/core/eventquerytimestamps.go @@ -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))) +} + diff --git a/core/externalMemMap.go b/core/externalMemMap.go new file mode 100644 index 0000000..ca3191e --- /dev/null +++ b/core/externalMemMap.go @@ -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. + +} + diff --git a/core/fabric.go b/core/fabric.go new file mode 100644 index 0000000..debe1a7 --- /dev/null +++ b/core/fabric.go @@ -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))) +} + diff --git a/core/imageCopy.go b/core/imageCopy.go new file mode 100644 index 0000000..5b7374e --- /dev/null +++ b/core/imageCopy.go @@ -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))) +} + diff --git a/core/imageFormatSupport.go b/core/imageFormatSupport.go new file mode 100644 index 0000000..f566a25 --- /dev/null +++ b/core/imageFormatSupport.go @@ -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 + +} + diff --git a/core/imageQueryAllocProperties.go b/core/imageQueryAllocProperties.go new file mode 100644 index 0000000..3a82278 --- /dev/null +++ b/core/imageQueryAllocProperties.go @@ -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))) +} + diff --git a/core/imagememoryproperties.go b/core/imagememoryproperties.go new file mode 100644 index 0000000..961c2cc --- /dev/null +++ b/core/imagememoryproperties.go @@ -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))) +} + diff --git a/core/imageview.go b/core/imageview.go new file mode 100644 index 0000000..4e33c6d --- /dev/null +++ b/core/imageview.go @@ -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))) +} + diff --git a/core/imageviewplanar.go b/core/imageviewplanar.go new file mode 100644 index 0000000..33d9364 --- /dev/null +++ b/core/imageviewplanar.go @@ -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 + +} + diff --git a/core/immediateCommandListAppend.go b/core/immediateCommandListAppend.go new file mode 100644 index 0000000..31e18df --- /dev/null +++ b/core/immediateCommandListAppend.go @@ -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))) +} + diff --git a/core/ipcMemHandleType.go b/core/ipcMemHandleType.go new file mode 100644 index 0000000..cfa030d --- /dev/null +++ b/core/ipcMemHandleType.go @@ -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))) +} + diff --git a/core/kernelAllocationProperties.go b/core/kernelAllocationProperties.go new file mode 100644 index 0000000..1f98a6a --- /dev/null +++ b/core/kernelAllocationProperties.go @@ -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))) +} + diff --git a/core/kernelMaxGroupSizeProperties.go b/core/kernelMaxGroupSizeProperties.go new file mode 100644 index 0000000..f72e12e --- /dev/null +++ b/core/kernelMaxGroupSizeProperties.go @@ -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 + diff --git a/core/kernelSchedulingHints.go b/core/kernelSchedulingHints.go new file mode 100644 index 0000000..04555d1 --- /dev/null +++ b/core/kernelSchedulingHints.go @@ -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))) +} + diff --git a/core/linkageInspection.go b/core/linkageInspection.go new file mode 100644 index 0000000..d302494 --- /dev/null +++ b/core/linkageInspection.go @@ -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))) +} + diff --git a/core/linkonceodr.go b/core/linkonceodr.go new file mode 100644 index 0000000..df4d65c --- /dev/null +++ b/core/linkonceodr.go @@ -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 + +) + diff --git a/core/memoryCompressionHints.go b/core/memoryCompressionHints.go new file mode 100644 index 0000000..14c7721 --- /dev/null +++ b/core/memoryCompressionHints.go @@ -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; + +} + diff --git a/core/memoryFreePolicies.go b/core/memoryFreePolicies.go new file mode 100644 index 0000000..d325547 --- /dev/null +++ b/core/memoryFreePolicies.go @@ -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))) +} + diff --git a/core/memoryProperties.go b/core/memoryProperties.go new file mode 100644 index 0000000..01acf82 --- /dev/null +++ b/core/memoryProperties.go @@ -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 + +} + diff --git a/core/mutableCommandList.go b/core/mutableCommandList.go new file mode 100644 index 0000000..af10d87 --- /dev/null +++ b/core/mutableCommandList.go @@ -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))) +} + diff --git a/core/powersavinghint.go b/core/powersavinghint.go new file mode 100644 index 0000000..3ba0a45 --- /dev/null +++ b/core/powersavinghint.go @@ -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. + +} + diff --git a/core/subAllocationsProperties.go b/core/subAllocationsProperties.go new file mode 100644 index 0000000..8292e4c --- /dev/null +++ b/core/subAllocationsProperties.go @@ -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. + +} + diff --git a/core/subgroups.go b/core/subgroups.go new file mode 100644 index 0000000..f0849cf --- /dev/null +++ b/core/subgroups.go @@ -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 + +) + diff --git a/rntm/common.go b/rntm/common.go deleted file mode 100644 index fa8c5f7..0000000 --- a/rntm/common.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by gen. DO NOT EDIT. - -package rntm