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

893 lines
52 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file ze_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// 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))
}